DevOps — How to install Redis on CentOS 6.7 server

In this article we will learn how to install redis on CentOS 6.7 server.
About redis: https://redis.io/

Prerequisites

  • CentOS 6.7 server
  • Access server via SSH with root user permission

Step 1 — Enable EPEL repository

First we need to enable EPEL (Extra Packages for Enterprise Linux) repository on server.

$ wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

If wget command not found, try running yum install wget then run the above command.

Now run command:

$ rpm -ivh epel-release-7–5.noarch.rpm

Step 2 — Install redis

Install redis on server by running command:

$ yum install redis -y

Check status redis: $ service redis status

Start/Stop/Restart redis server: $ service redis start|stop|restart

Test redis installation: $ redis-cli ping . If the response output is PONG, that mean installation is completed successfully.

Step 3 — Configuration redis server

Edit configuration follow path /etc/redis.conf . Don’t forget restart redis.

Listing port of redis server: $ ps aux | grep redis

Happy coding!