Redis is an open-source, in-memory data structure store, which is used as a database, cache, and message broker. Redis stands out from other databases is due to it being able to store higher-level data such as lists, sets, maps, and more. It is highly recommended to use Redis to improve your VPS with its user-friendly interfaces as well as for its exceptional features.
In this article, we will guide you on how to install Redis in your Linux based VPS. The Linux distribution used in this guide is Ubuntu 18.04.
Step 1: Update Repository
Firstly, access your VPS using SSH. Then update your Ubuntu repository packages using the following commands in your terminal.
sudo apt update
Step 2: Installation
To install Redis onto your server, run the following command.
sudo apt install redis
To proceed with the Redis installation when prompted, press Y then Enter.
Step 3: Verify Installation
To verify if the installation is installed correctly, run the following command.
redis-cli --version
You should be able to see the version of Redis installed in your system at the output if it is installed correctly. Retrace the previous steps if any issue regarding the installation process.
To check the current status of Redis, use this command.
sudo systemctl status redis
You should be able to see that Redis is running in the active status. In the case where it is inactive, run the following command to start Redis.
sudo systemctl start redis-server
Conversely, if the system is running and you want to stop it, run the following command.
sudo systemctl stop redis
With the instructions above, you should be able to complete the Redis installation into your system and started running it.