Install Redis PHP Module from source

To install Redis PHP module from source, run

cd /usr/local/src
git clone https://github.com/phpredis/phpredis.git
cd /usr/local/src/phpredis
/usr/serverok/php-7.1.12/bin/phpize
./configure --with-php-config=/usr/serverok/php-7.1.12/bin/php-config
make && make install

Once installed, edit your php.ini file, add following below extension_dir line

extension=redis.so

Verify redis is installed with php -m

[root@vps154294 ~]# /usr/serverok/php-7.1.12/bin/php -m | grep redis
redis
[root@vps154294 ~]# 

Now restart web server

service httpd restart

phpinfo() will show following

phpinfo redis

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *