欢迎您光临本小站。希望您在这里可以找到自己想要的信息。。。

CentOS7更换镜像源

Linux water 3105℃ 0评论

1)先安装wget 

执行命令 yum install -y wget

[root@localhost ~]# yum install -y wget

2) 查询国内镜像源

打开阿里镜像http://mirrors.aliyun.com/

3)下载CentOS 7的repo文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

更新镜像源

#清除缓存yum clean all  

#生成缓存yum makecache

[root@localhost ~]# yum clean all

Loaded plugins: fastestmirror

Cleaning repos: base extras updates

Cleaning up everything

Cleaning up list of fastest mirrors

[root@localhost ~]# yum makecache

转载请注明:学时网 » CentOS7更换镜像源

喜欢 (3)or分享 (0)

您必须 登录 才能发表评论!