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