Linux CentOS configures Alibaba Cloud yum source

One: Back up the files first so that they can be restored if the configuration fails.

cd /etc/yum.repos.d 
mkdir back 
mv *.repo back

2: Download Alibaba Cloud yum source

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

Three: Production cache

yum clean all 
rm -rf /var/cache/yum/ 
yum makecache

The configuration is completed and the completion information is as follows:

Guess you like

Origin blog.csdn.net/kzhzhang/article/details/134244696