install redis server from source in centos1 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

install redis server from source in centos

Hi Techrunnr Readers, this document deals with how to install redis server from source in centos.

Redis, RE-dis is an open-source in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, hyperloglogs, bitmaps and spatial indexes



1. Install the dependencies

yum install wget gcc make

2. Download the latest stable redis package

3. Extract and Install Redis

tar -zxf redis-stable.tar.gz
cd redis-stable/
make test
make install
mkdir /etc/redis
mkdir -p /var/redis
cp redis.conf /etc/redis/

4. Change your configuration accordingly

#vim /etc/redis/redis.conf

logfile "/var/log/redis.log"
dir /var/redis/

5. Create Service file and add the following lines

vim /etc/systemd/system/redis.service

Description=Redis In-Memory Data Store
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown

6. Verify the installation

service redis start
service redis status

That’s it!!!

© 2018, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

2 Thoughts to “install redis server from source in centos”

  1. Rishad Azeez

    Well explained.
    But using root is not recommended.

    Instead create new user (e.g., redis) and set appropriate permission for directories used by redis is recommended.

    1. Thank your Rishad for valuable comment.

Leave a Reply