First use php-m to see which extensions you have installed.
1. Use wget to download Redis compression package
wget Https://github.com/phpredis/phpredis/archive/develop.zip
2, decompression Develop.zip
Unzip Develop.zip
3, enter the unpacked folder, execute phpize generate configure
CD Develop
Phpize
4. Using Configure
./configure--with-php-config=/usr/bin/php-config
5. Make/make Install
6, modify the php.ini configuration file, the last line of the Sword Exetension=redis.io view the configuration file path command PHP--ini
Some common problems are:
~ About Redis Unable to store data, for the time being unaware of the reason, into the Redis database execution:
Config Set-writes-on-bgsave-error no
~ When the command line executes a PHP file to display data and the browser cannot display it:
getsebool-a | grep httpd
sudo setsebool httpd_can_network_connect 1
CentOS 7 Php-redis Extended installation, browser does not display data and Redis cannot store data FAQ Solutions