How To Install Redis on CentOS 8

Install Redis on CentOS 8

In this tutorial we will show you how to install Redis on CentOS 8. For those of you who didn’t know, Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. Redis also supports datatypes such as Transitions, Publish and Subscribe. ‘Redis ’ is considered more powerful than ‘Memcache’. It would be smart to bring ‘Redis’ into practice and put ‘Memcache’ down for a while.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Redis on a CentOS 8 server.

Install Redis on CentOS 8

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Redis on CentOS.

Install Redis using dnf command:

Once the package is installed, start and enable Redis service to start on boot:

Check Redis server version:

Step 3. Configuring Redis Server on CentOS 8.

You can configure Redis using the /etc/redis.conf configuration file:

Now open it for editing using your favorite text editing:

Then change line 69 bind 127.0.0.1 to below:

After changes in the Redis configuration file, restart the Redis service to apply the changes:

Step 4. Configure firewalld for Redis.

If you have an active firewalld service, allow port 6379:

Finally, access the Redis server using the redis-cli client program:

Congratulation’s! You have successfully installed Redis. Thanks for using this tutorial for installing Redis server on CentOS 8 system. For additional help or useful information, we recommend you to check the official Redis website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!