CentOS7 PHP升级5.4到5.6

来源:互联网 发布:安卓看本子软件 编辑:程序博客网 时间:2024/06/07 01:08
https://webtatic.com/packages/php56/资料来源
http://www.techoism.com/how-to-upgrade-php-version-5-4-to-5-6-on-centosrhel/资料来源

1.升级yum版本库的软件包
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

2.为了不在安装时产生冲突,必须删除旧版本(version 5.4)的依赖包
yum remove php-common

3.安装php5.6 中所有你想安装的模块 SAPI(Server Application Programming Interface 服务器端应用编程)
yum install -y php56w (中括号内为可选)[php56w-fpm php56w-cli php56w-mysql php56w-gd php56w-ldap php56w-obdc php56w-pdo php56w-pear php56w-mbstring php56w-xml php56w-xmlrpc php56w-snmp php56w-soap]

4.重启apache/nginx
apache:      systemctl restart httpd.service
nginx:         systemctl restart nginx.service
0 0
原创粉丝点击