更新Centos的yum源
2017-12-27 21:29
288 查看
http://centos.ustc.edu.cn/help/centos.html
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
cat > /etc/yum.repos.d/CentOS-Base.repo
yum clean all
yum repolist
yum makecache
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
cat > /etc/yum.repos.d/CentOS-Base.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-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus baseurl=https://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
yum clean all
yum repolist
yum makecache
相关文章推荐
- CentOS更改yum源与更新系统
- CentOS 7更改yum源与更新系统
- 将CentOS系统软件包yum源更新为阿里云
- centos更新yum源
- CentOS更改yum源与更新系统
- CentOS更改yum源与更新系统
- CentOS更改yum源与更新系统
- Red Hat 更新yum源为centos,并安装c环境
- CentOS更改yum源与更新系统
- Centos5.6 更新yum源
- CentOS更改yum源与更新系统
- Red Hat 6.2 64如何使用Centos的YUM源更新两种方法
- 在CentOS 7下更改yum源与更新系统。
- centos 7配置网络 更新yum源
- centos更新yum源
- CentOS 6.5 更新yum源
- CentOS更改yum源与更新系统
- CentOS更改yum源与更新系统
- CentOS 更新yum源
- CentOS更改yum源与更新系统