Centos yum source configuration in the cloud Ali

Ali cloud yum in centos source configuration

1. First, the system comes back up source profile /etc/yum.repos.d/CentOS-Base.repo yum

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

2. Download ailiyun the yum source profile to /etc/yum.repos.d/

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

If you do not networked, the need to download the host copy the file into the directory

3, run yum makecache generate cache

 yum makecache

4, this time to update the system will see the following information mirrors.aliyun.com

yum update -y

Guess you like

Origin www.cnblogs.com/jimlau/p/11917941.html