Cheap VPS host selection
Provide server host evaluation information

How to replace yum source in Centos7

To replace the yum source in CentOS 7, follow the steps below:

1. Backup the original yum source configuration file (optional):

 sudo  cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2. Download the new yum source configuration file:

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

The above link is the yum source of CentOS 7 provided by Alibaba Cloud. You can also select other image sources as needed.

3. Execute the following command to clear and rebuild yum cache:

 sudo yum clean all sudo yum makecache

So far, the yum source of CentOS 7 has been successfully replaced. Now you can use the yum command to install and update the software package.

Do not reprint without permission: Cheap VPS evaluation » How to replace yum source in Centos7