To install redis run the below command.
sudo apt install redis-server |
Once redis is installed, you can check if the installation was successful by running the following command.
redis-cli --version |
Check if the redis instance is running.
sudo systemctl status redis-server |
The default redis configuration file is located in the /etc/redis/redis.conf directory. Open the file using any text editor.
sudo nano /etc/redis/redis.conf |
Locate the line bind 127.0.0.1 -::1 and change the IP address to the IP address of your network.
Locate the word requirepass and replace it with requirepass some-password.
Save the changes and close the file.
Restart redis service to apply the changes.
sudo systemctl restart redis-server |