Skip to content

Instantly share code, notes, and snippets.

@strrife
Forked from nghuuphuoc/1) Install
Last active November 18, 2015 19:28
Show Gist options
  • Save strrife/8031c79a2f3bff29867f to your computer and use it in GitHub Desktop.
Save strrife/8031c79a2f3bff29867f to your computer and use it in GitHub Desktop.
Install Redis on Centos 6
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum -y --enablerepo=remi,remi-test install redis
sudo nano /etc/sysctl.conf
# Redis
vm.overcommit_memory=1
sysctl vm.overcommit_memory=1
sysctl -w fs.file-max=100000
chkconfig --add redis
chkconfig --level 345 redis on
service redis start
redis-cli ping
wget https://github.com/nicolasff/phpredis/zipball/master -O phpredis.zip
unzip phpredis.zip
cd phpredis-phpredis-*
phpize
./configure
make
make install
#CPanel
nano /usr/local/lib/php.ini
extension=redis.so
php -r "var_dump(class_exists('Redis'));"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment