linux 更换yum源 更新PHP版本

1.首页安装Webtatic EL6 YUM源

rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm  

2.停止web服务器

service nginx stop

或者

service httpd stop

3.删除当前的 php 安装 php5.4

yum remove php*

yum install php54w

yum install php55w php55w-gd php55w-mbstring php55w-mysql php55w-fpm

4.重启web服务器

service php-fpm restart
service nginx start

或者

service httpd restart

5.查看php版本

php -v

PHP 5.4.33 (cli) (built: Sep 19 2014 19:58:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

原文地址:https://www.cnblogs.com/afei-happy/p/7070513.html