CentOS 7 changes yum source and update system

0. Open source mirroring

NetEase Open Source Mirror Mirror

NetEase open source mirroring help: http://mirrors.163.com/.help

Netease open source mirroring help

Alibaba Cloud Open Source Image

https://mirrors.aliyun.com/repo/

1. Backup

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

2. Download CentOS-Base.repo to /etc/yum.repos.d/

cd   /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

3. Generate cache

yum clean all
yum makecache

4. Update the system

It may take a long time to update the system depending on the server network speed

yum -y update

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325845983&siteId=291194637