1.启用 Remi 仓库
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2.使用 yum-config-manager 来启用 PHP 5.6 存储库。
yum install -y yum-utils
sudo yum-config-manager --enable remi-php56
3.安装 PHP 5.6 及其模块
sudo yum install -y php-devel php-pear php php-opcache php-mysqlnd php-mbstring php-mcrypt php-pdo php-gd php-xml php-bcmath php-fpm
4.启动 PHP-FPM 服务:
systemctl start php-fpm
5.验证 PHP 版本
php -v
安装redis扩展
wget http://pecl.php.net/get/redis-2.2.8.tgz
tar xf 2.2.8.tgz
cd phpredis-2.2.8
phpize
./configure --with-php-config=/bin/php-config
make && make install
echo "extension="redis.so"" >> /usr/local/php/etc/php.ini
systemctl restart php-fpm
如果有报错安装依赖
yum install wget make gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl
中文下载
http://pecl.php.net/package/redis