Php redis module installation for CentOs 6.6

Redis database is a powerful and easy tool to use inside all kind of application.

If you are planning to use it inside php application you need to install a php module to acces to his structures; the only (not really) problem is that you have to build your module on your own.

Above you can find the procedure to keep it fully functional inside a CentoS System (6.6 in this case).

Install php-devel module to have ability of build php module from source code

yum install php-devel

Download the module source code

git clone https://github.com/phpredis/phpredis.git

Compile and install it

cd phpredis
phpize
./configure
make
make install

Once you have installed, you have to modify your php.ini to load extension during startup phase you can do this adding the row

#Dynamic extension
extension=redis.so

Restart httpd

/etc/init.d/httpd restart

and you will be able to view extension loaded from your phpinfo().

That’s all!!

If you need this precedure for Xamp installed on Ubuntu you can click on

Install PHP Redis in XAMPP on Ubuntu 16.04 LTS

 

Leave a Reply