PHP最新版本,php5.4 升级,centos上PHP5.3升级到PHP5.4及更高版本方法

 2023-09-25 阅读 18 评论 0

摘要:yum配置执行命令下载、安装yum源,当前是针对Centos6并且64位版本的源:PHP最新版本、[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.

yum配置

执行命令下载、安装yum源,当前是针对Centos6并且64位版本的源:

PHP最新版本、[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

centos可以直接升级吗、[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

php5.6安装?[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

centos内核升级、如果安装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

centos 升级、查看所有支持版本

[root@T_249 yum.repos.d]# yum list php* |grep php-devel

php-devel.x86_64 5.3.3-46.el6_6 @updates

centos8安装php?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报错解决方法:

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

编辑[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

(责任编辑:最模板)

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/3/95336.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息