1. 程式人生 > >RedHat6使用centos6的yum源

RedHat6使用centos6的yum源

repos clas yum 內存 amp rpm col 版本號 編輯

更換源

cd /etc/yum.repos.d/
wget  http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo

編輯文件,把文件裏面的$releasever全部替換為版本號,即6.5 最後保存!或者直接把下面的內存拷貝到CentOS6-Base-163.repo文件中即可(已經修改好)

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use 
this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-6 - Base - 163.com baseurl=http://mirrors.163.com/centos/6/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-6 - Updates - 163.com baseurl=http://mirrors.163.com/centos/6/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful [extras] name=CentOS-6 - Extras - 163.com baseurl=http://mirrors.163.com/centos/6/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-6 - Plus - 163.com baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-6 - Contrib - 163.com baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

RedHat6使用centos6的yum源