赞
踩
阿里镜像官方地址:http://mirrors.aliyun.com/
CentOS 7
wgte -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyou.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/centOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
准备工作
(查看网络是否连接:IP addr)
1.如果没有连接:/etc/sysconfig/network-scripts/ifcfg-ens33
2.修改DNS网关 vi/etc/resolv.conf
3.重启网络服务:systemctl restarl network.service
4.再次检查网络是否连接
1.安装wger
yum install -y wger
2.下载CentOS 7的repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo
或者
curl -O /etc/yum.repos.d/CentOS-Base.repo
3.更新镜像源
清除缓存:yum clean all
生成缓存:yum makecache
更改配置文件(重要)
1.备份CentOS 7系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo命令:
mv /etc/yum.repos.d/repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.找到yum源的配置路径
cd /etc/yum.repos.d
3.查看该目录下所有文件目录
ll
4.打开CentOS-Base.repo文件:
vim CentOS-Base.repo
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。