简简单单三步,让你成功更换centos7 的YUM源
centos7在2024年6月30日,生命周期结束,官方不再进行支持维护官方的YUM源也下线了下线的方式是使yum的域名不解析。所以现在需要配置国内的YUM源1.打开源文件打开CentOS-Base.reposudo vi /etc/yum.repos.d/CentOS-Base.repo2.替换源文件内容#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]nameCentOS-$releasever - Base - mirrors.aliyun.comfailovermethodprioritybaseurlhttp://mirrors.aliyun.com/centos/$releasever/os/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/gpgcheck1gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates[updates]nameCentOS-$releasever - Updates - mirrors.aliyun.comfailovermethodprioritybaseurlhttp://mirrors.aliyun.com/centos/$releasever/updates/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/gpgcheck1gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]nameCentOS-$releasever - Extras - mirrors.aliyun.comfailovermethodprioritybaseurlhttp://mirrors.aliyun.com/centos/$releasever/extras/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/gpgcheck1gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]nameCentOS-$releasever - Plus - mirrors.aliyun.comfailovermethodprioritybaseurlhttp://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/gpgcheck1enabled0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users[contrib]nameCentOS-$releasever - Contrib - mirrors.aliyun.comfailovermethodprioritybaseurlhttp://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/gpgcheck1enabled0gpgkeyhttp://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-73. 清理YUM缓存并更新sudo yum clean allsudo yum makecachesudo yum update
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2410454.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!