说明: # cd /etc/yum.repos.d/ # mv CentOS-Base.repo CentOS-Base.repo.bak //备份原始配置文件 # wget http://dl.gaingreat.com/CentOS6-Base-163.repo //获取CentOS 6.*的repo,注意将CentOS6-Base-163.repo所有的$releasever改为6!!!也可以复制附录2内容到CentOS_Base.repo。CentOS 5.*为http://dl.gaingreat.com/CentOS5-Base-163.repo
# yum clean all # yum makecache //也可以yum-plugin-fastestmirror(自动添加高速源,自动挑选快的镜像站,未试) # yum install yum-fastestmirror 注:确定/etc/yum.conf中的plugins=1
# 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-$releasever - Base - 163.com baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates - 163.com baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Extras - 163.com baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Plus - 163.com baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&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-$releasever - Contrib - 163.com baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# Generated by NetworkManager search 202.96.209.6 nameserver 202.96.209.6 可能202.96.209.6这个DNS服务器已经不能正常工作,修改后的配置 # Generated by NetworkManager #search 202.96.209.133 nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 202.96.209.6(责任编辑:IT) |