在作实验时,使用rpm包安装php时,系统自带的版本老是很旧。想安装新版本的php rpm包时,又发现各类依赖包版本达不到要求。javascript
Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
Requires: libzip5(x86-64) >= 1.3.2
Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
Requires: libzip.so.5()(64bit)
因此,只能从remi源来获取php,可是只配置remi还不够,由于它只有php各个版本相关的包,其余依赖包(如libzip5)和相关工具(如php-fpm)都放在remi safe源中的,所以须要同时配置remi源和remi safe源,remi safe中存放的是安装php过程当中可能须要的包以及其余相关工具,例如依赖包libzip五、php容器php-fpm。php
[root@xuexi ~]# cat /etc/yum.repos.d/remi.repo
[remi]
name=remirepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/php56/x86_64/
enable=1
gpgcheck=0
[remisafe]
name=remisaferepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/safe/x86_64/
enable=1
gpgcheck=0
再yum安装就一路顺利了。css
yum --disablerepo=* --enablerepo=remi* -y install php php-fpm