entos上PHP5.3升級到PHP5.4及更高版本方法
yum配置 執行命令下載、安裝yum源,當前是針對Centos6并且64位版本的源: [root@T_249 yum.repos.d]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm[root@T_249 yum.repos.d]# rpm -ivh ht
創新互聯基于成都重慶香港及美國等地區分布式IDC機房數據中心構建的電信大帶寬,聯通大帶寬,移動大帶寬,多線BGP大帶寬租用,是為眾多客戶提供專業成都托管服務器報價,主機托管價格性價比高,為金融證券行業服務器托管,ai人工智能服務器托管提供bgp線路100M獨享,G口帶寬及機柜租用的專業成都idc公司。
yum配置 [root@T_249 yum.repos.d]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [root@T_249 yum.repos.d]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 編輯[remi.repo]下的enabled選項從0設為1 [root@T_249 yum.repos.d]# sed -i '/enabled/s/=0/=1/g' /etc/yum.repos.d/remi.repo 運行如下命令 [root@T_249 yum.repos.d]# yum clean all [root@T_249 yum.repos.d]# yum makecache 安裝php5.4 [root@T_249 yum.repos.d]# yum install php54 php54-php-devel php54-php-MySQL* php54-php-gd php54-php-fpm php54-php-mbstring 如果安裝php5.5 [root@T_249 yum.repos.d]# yum install php55 php55-php-devel php55-php-mysql* php55-php-gd php55-php-fpm php55-php-mbstring 目前可以安裝到php7.0 [root@T_249 yum.repos.d]# yum list php* |grep php-devel php-devel.x86_64 5.3.3-46.el6_6 @updates php54-php-devel.x86_64 5.4.45-2.el6.remi @remi php-devel.x86_64 5.6.15-1.el6.remi remi-php56 php55-php-devel.x86_64 5.5.30-1.el6.remi remi php56-php-devel.x86_64 5.6.16-0.1.RC1.el6.remi remi-test php70-php-devel.x86_64 7.0.0-0.25.RC8.el6.remi remi 運行如下命令[yum update php*],則直接升級到php5.6 安裝運行yum報錯解決方法: 編輯[epel.repo]下的baseurl前的#號去掉,mirrorlist前添加#號 [root@T_249 yum.repos.d]# sed 's/#baseurl=/baseurl=/g;s/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/epel.repo |
當前標題:entos上PHP5.3升級到PHP5.4及更高版本方法
地址分享:http://www.xueling.net.cn/article/ggidid.html