linux 配置yum源

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] 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
posted @ 2022-12-20 10:22  浊酒一杯温如言  阅读(40)  评论(0编辑  收藏  举报