Skip to content

Instantly share code, notes, and snippets.

Last active September 10, 2017 01:45
  • Star 19 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Redis install on CentOS 6.4
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see
$ yum install make gcc tcl
$ cd /usr/local/src
$ wget
$ tar xzf redis-2.6.13.tar.gz
$ cd redis-2.6.13
$ make
$ make test
$ make install
$ which redis-server
/usr/bin/which: no redis-server in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
Now we add /usr/local/bin to PATH, thanks to :)
$ echo 'pathmunge /usr/local/bin' > /etc/profile.d/
$ chmod +x /etc/profile.d/
Add sane configuration into redis, thanks to and :)
$ mkdir /etc/redis /var/lib/redis
$ sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel debug$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf > /etc/redis/redis.conf
$ wget
$ sed -i "s/usr\/local\/sbin\/redis/usr\/local\/bin\/redis/" redis-server
$ chmod u+x redis-server
$ mv redis-server /etc/init.d
$ /sbin/chkconfig --add redis-server
$ /sbin/chkconfig --level 345 redis-server on
$ /sbin/service redis-server start
Starting redis-server: [ OK ]
$ service redis-server status
redis-server (pid NNNN) is running...
Let's test it:
$ redis-cli
$ telnet 6379
$ set attitude:today "happy"
$ get attitude:today
And happy day to you too ;)
Copy link

Don't you think that it is too complex to install redis that way? When I use pip install redis I get the version of 2.10.0, but I I find the stable version is 2.8.13 using this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment