您的位置:首页 > 编程语言 > PHP开发

php升级5.3到5.4,5.5,5.6

2016-09-30 18:11 549 查看
Laravel要求php大于5.5.9,升级php5.3.3到5.6.14(最新版为 5.6.15 )Add EPEL and Remi repositories onto your system:wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmwget http://rpms.famillecollet.com/enterprise/remi-release-6.rpmrpm -Uvh remi-release-6*.rpm epel-release-6*.rpmenable your newly added Remi repo. Open the /etc/yum.repos.d/remi.repo在想要升级的版本里,enabled=0 line to enabled=1:Update to PHP 5.4, in [remi] section:Update to PHP 5.5, in [remi-php55] section:Now update yum:
yum update -y  //这个会升级很多额
报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉编辑[epel]下的baseurl前的#号去掉,mirrorlist前添加#号再次运行
yum update -y
最后检查
php -vPHP 5.6.24 (cli) (built: Jul 21 2016 07:42:08) Copyright (c) 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
http://www.servermom.org/upgrade-php-53-54-55-centos/1534/====================以前的资料=============================结果:Removed: php.x86_64 0:5.3.3-46.el6_6 php-cli.x86_64 0:5.3.3-46.el6_6 php-common.x86_64 0:5.3.3-46.el6_6 php-devel.x86_64 0:5.3.3-46.el6_6 php-fpm.x86_64 0:5.3.3-46.el6_6 php-gd.x86_64 0:5.3.3-46.el6_6 php-mbstring.x86_64 0:5.3.3-46.el6_6 php-mysql.x86_64 0:5.3.3-46.el6_6 php-pdo.x86_64 0:5.3.3-46.el6_6 php-xml.x86_64 0:5.3.3-46.el6_6 Installed: php56w.x86_64 0:5.6.14-2.w6 php56w-cli.x86_64 0:5.6.14-2.w6 php56w-common.x86_64 0:5.6.14-2.w6 php56w-devel.x86_64 0:5.6.14-2.w6 php56w-fpm.x86_64 0:5.6.14-2.w6 php56w-gd.x86_64 0:5.6.14-2.w6 php56w-mbstring.x86_64 0:5.6.14-2.w6 php56w-mysql.x86_64 0:5.6.14-2.w6 php56w-pdo.x86_64 0:5.6.14-2.w6 php56w-xml.x86_64 0:5.6.14-2.w6 php -vPHP 5.6.14 (cli) (built: Oct 16 2015 08:41:09) 安装1,
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm[/code] 2,
yum install yum-plugin-replace
yum replace php-common --replace-with=php56w-common
It will likely give you a message “WARNING: Unable to resolve all providers …”. This is normal, and you can continue by tying “y“.
Done!https://webtatic.com/packages/php56/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: