With all of the prerequisites and dependencies downloaded to the server, we can go ahead and begin to install redis from source:
Download the latest stable release tarball from Redis.io.
Untar it and switch into that directory:
tar xzf redis-stable.tar.gz
Proceed to with the make command:
Run the recommended make test:
Finish up by running make install, which installs the program system-wide.
sudo make install
Once the program has been installed, Redis comes with a built in script that sets up Redis to run as a background daemon.
To access the script move into the utils directory:
From there, run the Ubuntu/Debian install script:
As the script runs, you can choose the default options by pressing enter. Once the script completes, the redis-server will be running in the background.
You can start and stop redis with these commands (the number depends on the port you set during the installation. 6379 is the default port setting):
sudo service redis_6379 start sudo service redis_6379 stop
You can then access the redis database by typing the following command:
You now have Redis installed and running. The prompt will look like this: