配置阿里YUM源

地址:阿里yum源

1.备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

提示: 备份之前检查wget是否安装,如果没有安装,使用

yum install wget -y

安装wget工具

2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/

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

提示:若使用阿里云服务器,将源的域名从mirrors.aliyun.com改为mirrors.aliyuncs.com,不占用公网流量

3.之后生成yum缓存

yum clean all
yum makecache

4.配置完成之后更新yum

yum update -y

补充 查看系统版本:

uname -r

3.10.0-123.el7.x86_64

cat /etc/system-release

CentOS Linux release 7.2.1511 (Core)

results matching ""

    No results matching ""