“yum install php”php版本问题

我已经通过执行以下命令安装了php </ p>

  yum install  php 
</ code> </ pre>

它在我的服务器上安装php 5.3.3。现在我要安装php 5.4。</ p>

请帮忙。 提前致谢。 </ p>
</ div>

展开原文

原文

I have installed php by executing following command

yum install php

It install php 5.3.3 in my server.Now i want to install php 5.4.

Please help.Thanks in advance.

dongyaofu0599
dongyaofu0599 最初我的服务器php版本是5.4.25。
大约 5 年之前 回复

3个回答



yum </ code>安装批准的软件包版本。 批准的版本取决于一些事项,例如您的分发以及软件包本身是否已经过测试并被视为有效。 此测试有时可能远远落后于软件包的开发。 有可能你安装的版本是最新批准的版本。</ p>

构建PHP并不是非常困难,所以这可能是你最好的选择。 从 yum </ code>卸载您的版本,并查看有关如何克隆的官方说明 </ p>

或者在 yum </ code>中寻找能够为您提供更新版本的其他软件包(请参阅@barbarity的答案)。</ p> \ n </ div>

展开原文

原文

yum installs approved versions of packages. The approved version depends on a few things, such as your distribution and whether the package itself has been tested and deemed as working. This testing can sometimes lag well behind the development of the packages. Chances are that the version that you have installed is the latest approved version.

Building PHP isn't manually terribly difficult, so that's probably your best option. Uninstall the version you have from yum and checkout the official instructions on how to clone and build yourself.

Either that or look around for other packages in yum that give you a newer version (see @barbarity's answer).



https上看到它 ://webtatic.com/packages/php54/ </ p>

要安装,首先必须将与CentOS / RHEL版本对应的Webtatic EL yum存储库信息添加到yum:< / p>

CentOS / RHEL 7.x:</ p>

  rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-  release.rpm 
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

nn

CentOS/RHEL 6.x: </ p>

  rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

nn

CentOS / RHEL 5.x:</ p>

  rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
</ pre>

现在你可以通过以下方式安装php:</ p>

  yum install php54w 
</ code> </ pre>
</ div>

展开原文

原文

Saw it on https://webtatic.com/packages/php54/

To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:

CentOS/RHEL 7.x:

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

CentOS/RHEL 5.x:

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

Now you can install php by doing:

yum install php54w

douci2015
douci2015 谢谢野蛮。
大约 5 年之前 回复
duanjiwei1283
duanjiwei1283 是的,首先卸载以前的版本。 此外,如果此答案对您有帮助,请将其标记为正确。
大约 5 年之前 回复
douyanjing0822
douyanjing0822 它似乎工作正常。但显示错误:php54w-与php-common-5.3.3-40.el6_6.x86_64的常见冲突。
大约 5 年之前 回复
duanputian5341
duanputian5341 我使用之前必须执行的其他命令进行编辑
大约 5 年之前 回复



参考 http://ahmed.amayem.com/replacing-yum-plugin-replace-one-yum-install-package -php-with-another-on-linux-centos-6 / </ p>

检查可用软件包</ p>

  rpm -q  php 
</ code> </ pre>

安装webtatic版本RPM(适用于CentOs 6.x)</ p>

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

nn

检查其他仓库中的可用包</ p>

   yum info php55w 
</ code> </ pre>

尝试使用yum update进行更新</ p>

  sudo yum update php 
< / code> </ pre>

使用yum删除然后yum install </ p>

  yum info php-common 
</ code> </ pre>

删除php-common </ p>

  sudo yum删除php-common 
</ code> </ pre>

安装php55w 和php55w-common </ p>

  sudo yum install php  55w php55w-common 
</ code> </ pre>

现在重新启动apache服务器,然后检查php版本。</ p>
</ div>

展开原文

原文

Reference http://ahmed.amayem.com/replacing-yum-plugin-replace-one-yum-install-package-php-with-another-on-linux-centos-6/

Check available packages

rpm -q php

Installing the webtatic release RPM(For CentOs 6.x)

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

Check for available packages in other repo

yum info php55w

Trying to update using yum update

sudo yum update php

Updating using yum remove then yum install

yum info php-common

Removing php-common

sudo yum remove php-common

Installing php55w and php55w-common

sudo yum install php55w php55w-common

Now restart your apache server then check the php version.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐