1. Download phpredis:
wget http://pecl.php.net/get/redis-3.1.0.tgz 或 wget https://github.com/nicolasff/phpredis/archive/3.1.0.tar.gz
2. Unzip the installation package and enter Directory after decompression
tar xzf redis-3.1.0.tgz cd redis-3.1.0
3. Generate configure configuration file in the current directory
/usr/local/php56/bin/phpize ./configure --with-php-config=/usr/local/php56/bin/php-config
4. Compile and install
make && make install
5. Finally load the phpredis extension in php.ini
extension=redis.so