升级php
yum配置执行命令下载、安装yum源:
view plain copy print?https://code.csdn.net/assets/CODE_ico.pnghttps://code.csdn.net/assets/ico_fork.svg
[*] wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[*] rpm -ivh epel-release-6-8.noarch.rpm
[*] wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
[*] rpm -ivh remi-release-6.rpm
[*] vi /etc/yum.repos.d/remi.repo
编辑下的enabled选项从0设为1
name=Les RPM de remi pour Enterprise Linux 6 – $basearch
#baseurl=http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
至此,安装完成。
安装完运行yum报错:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解决办法:
vi /etc/yum.repos.d/epel.repo
编辑下的baseurl前的#号去掉,mirrorlist前添加#号。正确配置如下:
name=Extra Packages for Enterprise Linux 6 – $basearch
baseurl=http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttps://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
再运行
yum clean all
yum makecache
最后运行命令:
yum update php*
即可。
页:
[1]