Install Redis PHP Module from source
To install Redis PHP module from source, run
1 2 3 4 5 6 |
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
1 |
extension=redis.so |
Verify redis is installed with php -m
1 2 3 |
[root@vps154294 ~]# /usr/serverok/php-7.1.12/bin/php -m | grep redis redis [root@vps154294 ~]# |
Now restart web server
1 |
service httpd restart |
phpinfo() will show following