CentOS8 yum source configuration


1. Configure the yum source of Alibaba Cloud

1. Back up the current yum source configuration file

Enter the /etc/yum.repos.d directory to back up the source configuration files in this directory:

cd /etc/yum.repos.d/
mkdir bk/
mv * bk/

2. Download the source configuration file

Use the wget command to download the mirror source of the corresponding system from Alibaba Cloud, here the author is CentOS 8

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

3. Modify the yum source configuration file

 sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

4. Update the yum source configuration file

yum makecache

5. Test

#成功执行即可
yum -y install vim*

end

  • Thank you for your patience in reading. If you have any suggestions, please private message or comment.
  • If there is something to gain, please bother to support, follow, like, comment, and collect. The blogger will update it frequently and make progress together with everyone.

Guess you like

Origin blog.csdn.net/qq359605040/article/details/129023312