1. 切换到 yum 源配置目录
cd /etc/yum.repos.d/
2. 备份所有配置文件
mkdir back mv * ./back
3. 新建一个 xxx.repo 文件
touch Centos-Base.repo
4. 编辑文件内容
vim Centos-Base.repo标签:BaseOS,配置,back,repo,Base,yum,linux From: https://www.cnblogs.com/laizongji/p/16993674.html
[BaseOS] name=CentOS-$releasever-Base baseurl=http://mirrors.shterm.com/repository/$contentdir/$releasever/BaseOS/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial