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
Categories: databaseLinux

Prabhin Prabharkaran

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

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.