This article presents a detailed guide to install Redis Database on Ubuntu 22.04 and Linux Mint.
How to install Redis Database on Ubuntu 22.04 & Linux Mint
The installation of Redis Database on Ubuntu 22.04 and Linux Mint is pretty straightforward and doesn’t require installing additional dependencies or packages on the system. Use the below-mentioned steps to install Redis successfully on your system.
Step 1: Update Ubuntu or Linux Mint packages
First, ensure that your system’s packages are up to date, which can be done from the following command:
If your packages need upgradation, run the following command to upgrade them:
Step 2: Install Redis Database
After updating the packages, install Redis database on your system through the following command:
Step 3: Start Redis Service
Once the Redis installation is completed, issue the following command to start its service:
You can enable or restart Redis service any time by replacing the “start” from the above command with “enable” or “restart”.
To check the running status of Redis service, issue the below-given command:
The above output confirms that Redis service is up and running on your system.
Testing Redis Functionality
To test whether the Redis database functionality is working correctly, you will need to execute the following command:
Then test the connectivity through the “ping” command.
The above output ensures that the server is still alive.
Now, for testing use the following statement:
With the output confirms OK, you can retrieve the value through following statement:
Use the “quit” statement to finish the test process.
Remove Redis Database from Ubuntu 22.04 and Linux Mint
If you no longer want to use Redis service on your system, you can execute the following command to completely remove it.
Conclusion
Redis database is a robust in-memory database that can easily be used as a cache on top of other databases to enhance the performance of the applications. Its installation is pretty simple on Ubuntu 22.04 and Linux Mint, which requires a single installation command. After that, you can easily use this database to execute various tasks faster than using MySQL or MariaDB.