sudo apt update
To update local apt
package cache.
sudo apt install redis-server
To download and install redis-server
sudo nano /etc/redis/redis.conf
Open on any text editor you want to edit the redis.conf
, I am here using nano
, you may use vim
.
Then inside the file, find the supervised directive. Change it to systemd (since Ubuntu uses systemd as the init system)
Before
supervised no
After
supervised systemd
Then save and close the file.
sudo systemctl start redis.service
To start the service.
sudo systemctl restart redis.service
To restart the service.
sudo systemctl enable redis-server
This will add on boot.
redis-cli ping
To test redis-cli if the output is below
PONG
Then it's fine.