How to Install Redis on CentOs 6
Redis is an open source (BSD licensed), in-memory data structure used as database and cache. Its a very powerful and advanced key-value store. It supports data structures such as strings, hashes, lists, sets, sorted sets and much more.

We will discuss more on it. Let us start with the Installation of Redis. As said in couple of previous article you have to login on the terminal with root privileges to install it. or use sudo. I am asuming you are on root privilege.
Before installing Redis you need some tools installed like gcc, gcc-c++, make and tcl. So install it first.
Tools are now installed. Now navigate to /usr/local/src and download redis
Download and Install Redis
1234567
cd /usr/local/src
wget http://download.redis.io/releases/redis-3.0.6.tar.gz
tar xzf redis-3.0.6.tar.gz
cd redis-3.0.6
Now build It and Install You can now test installation (Optional) If everything is ok it will display All tests passed without errors! in the end
Now copy the binary to bin directory
Now create a directory and copy Redis config file to it.
Now create a working directory for this Redis instance. -p option is for creating recursive directory structure under /var i.e. redis/6379 Edit Redis config file with your favourite text editor to make some necessery changes. Make sure you make change to following lines and set its value as given
123456789101112
vi /etc/redis/redis.conf
#Change Following
daemonize yes
pidfile /var/run/redis.pid
loglevel notice (choose any one from verbose/debug/notice/warning)
logfile /var/log/redis_6379.log
dir /var/redis/6379
123456
wget https://raw.githubusercontent.com/saxenap/install-redis-amazon-linux-centos/master/redis-server
mv redis-server /etc/init.d
chmod 755 /etc/init.d/redis-server
You are now on Redis command line. Try executing Redis commands here. Type exit or press ctrl+c to close session.
How to Install Redis on CentOs 6
Reviewed by JS Pixels
on
December 24, 2015
Rating:

very informative article :) thanks Altaf
ReplyDelete