Tags

,

1) Install
// — Compiling —
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install

2) Config
$ sudo nano /etc/sysctl.conf
vm.overcommit_memory=1
$ sysctl vm.overcommit_memory=1
$ sysctl -w fs.file-max=100000

3) Service commands
$ chkconfig –add redis
$ chkconfig –level 345 redis on
$ service redis start/stop/restart

4) 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/

Advertisements