Skip to content

Instantly share code, notes, and snippets.

@seansan
Forked from antond/redis install
Last active December 18, 2015 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seansan/5845977 to your computer and use it in GitHub Desktop.
Save seansan/5845977 to your computer and use it in GitHub Desktop.
Install redis, phprdis and collinmollenhours extensions
# 1.CentOS 6.3
# yum install make gcc
cd /opt
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz
tar zxf redis-2.6.14.tar.gz
cd redis-2.6.14
make
make install
mkdir -p /usr/local/bin
cp -pf src/redis-server /usr/local/bin
cp -pf src/redis-benchmark /usr/local/bin
cp -pf src/redis-cli /usr/local/bin
cp -pf src/redis-check-dump /usr/local/bin
cp -pf src/redis-check-aof /usr/local/bin
cp redis.conf /etc/redis.conf
mkdir /var/redis
chown nobody:nobody /var/redis
# Then manually edit /etc/redis.conf
# set the following (SED Command would be nice)
# daemonize yes
# maxmemory 512M
# server stuff grabbed from here: http://www.ebrueggeman.com/blog/install-redis-centos-56
wget https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
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
# Install phpredis
# php.ini is somewhere else, use find
# http://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html
/sbin/service redis-server start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment