Installing Redis to use as Laravel 4 cache

The following commands will install redis on a server running CentOS 6.4.

First, install the epel repo

sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 

Next, install the remi repo

sudo rpm -Uvh http://rpms.famillecollet cialis bestellen ohne rezept.com/enterprise/remi-release-6.rpm 

Now, you should be able to install redis using the yum package manager.

yum install redis -y http://codybonney.com/installing-redis-on-centos-6-4/
http://codybonney.com/installing-redis-on-centos-6-4/

mkdir /usr/share/redis
cd /usr/share/redis
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin
git clone https://github.com/nrk/predis.git vendor
ln -s /usr/share/redis/phpRedisAdmin /vagrant/public/redis

in local/config/database.php

'redis' => array(
'cluster' => false,
'default' => array(
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
),
)
'driver' => 'redis',
  • Find out the name of service’s script from /etc/init.d/ directory e.g. redis
  • Add it to chkconfig
    sudo /sbin/chkconfig --add redis
  • Make sure it is in the chkconfig.
    sudo /sbin/chkconfig --list redis
  • Set it to autostart
    sudo /sbin/chkconfig redis on