RHCSA考题二 :配置yum源
在mars.lab.example.com配置YUM存储库,存储库地址
- BaseOS
http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
- AppStream
http://content.example.com/rhel8.0/x86_64/dvd/AppStream
Answer:
编辑或者新建repo文件,这里选择编辑redhat.repo文件,
vim /etc/yum.repos.d/redhat.repo
内如
[BaseOS]
name=BaseOS
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=AppStream
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/AppStream
enabled=1
gpgcheck=0
验证:
yum makecache && yum list | wc -l
或者
yum repolist