在CentOS 6.5上升级PHP(最终版) [英] Upgrading PHP on CentOS 6.5 (Final)

查看:148
本文介绍了在CentOS 6.5上升级PHP(最终版)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新我的PHP(当前v:5.3.3为最新的稳定的PHP版本),但它没有发挥作用,并且表示没有任何更新.

I'm trying to update my PHP (currently v:5.3.3 to the latest stable PHP build) but it's not playing ball and it's saying there is nothing to update.

任何帮助都是有用的.

继续说:

没有标记为更新的软件包

No Packages marked for Update

推荐答案

正如Jacob所说,CentOS软件包仓库目前仅具有PHP 5.3.但是这些命令似乎对我有用...

As Jacob mentioned, the CentOS packages repo appears to only have PHP 5.3 available at the moment. But these commands seemed to work for me...

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum remove php-common       # Need to remove this, otherwise it conflicts
yum install php56w
yum install php56w-mysql
yum install php56w-common
yum install php56w-pdo
yum install php56w-opcache
php --version               # Verify version has been upgraded

如果需要,您也可以使用php54wphp55w.

You can alternatively use php54w or php55w if required.

注意!
如果它不能完全解决您的所有依赖性,则可能会破坏您的网站,因此在某些情况下,您可能需要几个额外的程序包. 请参阅此处以获取可用的其他PHP 5.6模块列表.

CAUTION!
This may potentially break your website if it doesn't fully resolve all your dependencies, so you may need a couple of extra packages in some cases. See here for a list of other PHP 5.6 modules that are available.

如果遇到问题,需要将其重置为默认值,则可以使用以下命令:

If you encounter a problem and need to reset back to the default, you can use these commands:

sudo yum remove php56w
sudo yum remove php56w-common
sudo yum install php-common
sudo yum install php-mysql
sudo yum install php

(感谢Fabrizio Bartolomucci)

这篇关于在CentOS 6.5上升级PHP(最终版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆