[base]name=CentOS-$releasever - Base#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infrabaseurl=http://mirror.bjtu.edu.cn/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=http://mirror.bjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6#released updates[updates]name=CentOS-$releasever - Updates#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infrabaseurl=http://mirror.bjtu.edu.cn/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=http://mirror.bjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-$releasever - Extras#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infrabaseurl=http://mirror.bjtu.edu.cn/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=http://mirror.bjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infrabaseurl=http://mirror.bjtu.edu.cn/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.bjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infrabaseurl=http://mirror.bjtu.edu.cn/centos/$releasever/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.bjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-6
在/etc/yum.repos.d/CentOS-Base.repo,文件中修改,注意拷贝一份,以防万一
校验Key导入:rpm --import http://mirror.bjtu.edu.cn/centos/6.7/os/x86_64/RPM-GPG-KEY-CentOS-6
更新:yum update