Table of Contents
Install Redis:
Login to your Ubuntu Server and make sure it is ready to install new packages:
sudo apt update
Install redis-server:
sudo apt install redis-server
Update Redis Directive Setting:
sudo nano /etc/redis/redis.conf
Change supervised from no to systemd since you are on Ubuntu
supervised systemd
Restart Redis Service:
sudo systemctl restart redis.service
Setup Redis Password:
To make your Redis service secure it is always better to setup strong password
sudo nano /etc/redis/redis.conf
Remove # from requirepass update the password:
requirepass <your-strong-password-here>
Generate Strong Password for Redis:
Instead of creating a password by yourself we can generate a very strong password using openssl use following command to generate the strong password:
openssl rand 60 | openssl base64 -A
You can again open up the redis.conf file and update the requirepass with new password you have generate.
Restart the Redis service:
sudo systemctl restart redis.service