Last updated:2021-08-03 18:56:33
Enter the directory of the yum source configuration file.
cd /etc/yum.repos.d/
ls
Back up the yum source configuration file of Kingsoft Cloud.
mv CentOS.repo CentOS_repo
Copy the system-provided yum source file to the current directory.
cp backup/CentOS-Base.repo .
ls
Update the system.
yum update
Enter the directory of the yum source configuration file.
cd /etc/yum.repos.d/
ls
Delete the system-provided yum source configuration file and use the file provided by Kingsoft Cloud.
rm -f CentOS-Base.repo
mv CentOS_repo CentOS.repo
Update the system.
yum update
Enter the directory of the yum source configuration file.
cd /etc/yum.repos.d/
Back up the current yum source configuration file.
mv CentOS-Base.repo CentOS-Base_repo_bak
Download the new configuration file. The following uses the yum source provided by NetEase as an example.
wget [http://mirrors.163.com/.help/CentOS6-Base-163.repo](http://mirrors.163.com/.help/CentOS6-Base-163.repo)
Rename the configuration file according to the file requirement. The following uses “CentOS6-Base-163.repo” as an example.
mv CentOS6-Base-163.repo CentOS-Base.repo
Update the system.
yum update
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.