Skip to content

Instantly share code, notes, and snippets.

@loinguyenduc101
Created July 14, 2016 11:16
Show Gist options
  • Save loinguyenduc101/cc83671f97cb4206fbed0664e215e30c to your computer and use it in GitHub Desktop.
Save loinguyenduc101/cc83671f97cb4206fbed0664e215e30c to your computer and use it in GitHub Desktop.
Redis on Centos 6
// --- install via yum ---
$ 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 --enablerepo=remi,remi-test install redis
// commands
$ chkconfig --add redis
$ chkconfig --level 345 redis on
$ service redis start/stop/restart
// config
$ sudo vi /etc/redis.conf
// Install php-redis extension
$ yum --enablerepo=remi,remi-test install php-redis
// ---------- Install PHP redis extension
// Install php-redis extension
$ yum --enablerepo=remi,remi-test install php-redis
// If it does not work, try the following steps:
$ wget https://github.com/nicolasff/phpredis/zipball/master -O phpredis.zip
$ unzip phpredis.zip
$ cd nicolasff-phpredis-*
$ phpize
$ ./configure
$ make
$ make install
Installing shared extensions: /usr/lib64/php/modules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment