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.
yum -y install gcc gcc-c++ make tcl
Download and Install Redis
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
make distclean make
make test
cp src/redis-server src/redis-cli /usr/local/bin
mkdir /etc/redis cp redis.conf /etc/redis
mkdir -p /var/redis/6379
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
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
chkconfig --add redis-server chkconfig redis-server on service redis-server start
vi /etc/sysctl.conf #Add following line on bottom sysctl vm.overcommit_memory=1
/usr/local/bin/redis-cli
How to Install Redis on CentOs 6
Reviewed by JS Pixels
on
December 24, 2015
Rating:
very informative article :) thanks Altaf
ReplyDelete