Introduction
In order to get the latest version of Redis, we will use apt to install it from the official Ubuntu repositories.
Update your local apt package cache and install Redis by typing:
sudo apt update
sudo apt install redis-server
To stop your redis server
sudo systemctl stop redis
To start the redis server when it is stopped
sudo systemctl start redis
To stop and then start the service again
sudo systemctl restart redis
To start the service again to start automatically when the server boots:
sudo systemctl enable redis