yum配置
執行命令下載、安裝yum源:
php
[plain] view plain copy print?ide
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm url
rpm -ivh epel-release-6-8.noarch.rpm spa
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm .net
rpm -ivh remi-release-6.rpm code
vi /etc/yum.repos.d/remi.repo orm
編輯[remi]下的enabled選項從0設爲1
[remi]
name=Les RPM de remi pour Enterprise Linux 6 – $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://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
編輯[epel]下的baseurl前的#號去掉,mirrorlist前添加#號。正確配置以下:
[epel]
name=Extra Packages for Enterprise Linux 6 – $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://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
blog
yum makecache ip
最後運行命令:rem
yum update php*
便可。