Install Redis Server in CentOS

Install necessary packages

On CentOS 6:

On CentOS 7

Install Redis 3.2

For installing Redis 3.2 you have to download the source file and compile it because Redis 3.2 is not available in any repository yet.

On CentOS 6 and CentOS 7

Now you have to extract the file that you just downloaded by typing:

Change directory with the command below:

It’s time to compile your Redis step by step:

Now run below command to get back to the parent directory and run the next command:

And for getting sure running a test:

It’s going to take a few minutes, you can check that everything is ok.

Install init script

In this section, we are going to install “init script” to manage the process of Redis.

You will be prompt for some configuration you can hit “Enter” to accept all the default values or you can set yours.

For Executable path, select the redis executable path [/usr/local/bin/redis-server]

Finally, your Redis server is installed and you can start the service by the command below:

For CentOS 6

For CentOS 7

If you want to test your Redis server you can easily use the instruction below:

The answer should be “Pong”

0

About the author

Janaki(http://mjanaki.com) - A Software developer with 9+ years of experience in multiple technology projects across web, mobile, and cloud applications with expertise in PHP, C#, MySQL, Web services and open source platforms.

Similar Posts

Comments are closed.