//备份
> cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
> vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base - yum.com
failovermethod=priority
baseurl=http://yum.com/centos/$releasever/os/$basearch/
http://yum.com/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://yum.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - yum.com
failovermethod=priority
baseurl=http://yum.com/centos/$releasever/updates/$basearch/
http://yum.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://yum.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - yum.com
failovermethod=priority
baseurl=http://yum.com/centos/$releasever/extras/$basearch/
http://yum.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://yum.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - yum.com
failovermethod=priority
baseurl=http://yum.com/centos/$releasever/centosplus/$basearch/
http://yum.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://yum.com/centos/RPM-GPG-KEY-CentOS-7
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - yum.com
failovermethod=priority
baseurl=http://yum.com/centos/$releasever/contrib/$basearch/
http://yum.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://yum.com/centos/RPM-GPG-KEY-CentOS-7
评论