我已经四处查看了这个主题,但所有与升级php on centOS相关的问题似乎都已经过时了。我找到了https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/ 而且看起来相当简单;但是,我不熟悉安装新的回购。
似乎有相当数量的repos有我需要的php 5.6软件包,但我不确定哪个会被认为是最好或最安全的。
此外,由于CentOS不提供最新版本,我应该注意哪些不兼容性?
答案 0 :(得分:4)
这是最适合我的方法:在CentOS 6或7上安装PHP 5.6:
CentOS 6. 按所示顺序输入以下命令:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
CentOS 7。按所示顺序输入以下命令:
yum -y update
yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://centos7.iuscommunity.org/ius-release.rpm
rpm -Uvh ius-release*.rpm
yum -y update
yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
了解如何升级到PHP 7及更高版本: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html