REHL8 /CENTOS8 yum 配置

[root@lu8db hgfs]# cat /etc/yum.repos.d/media.repo
[InstallMedia-BaseOS]
name=Red Hat Enterprise Linux 8 - BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/cdrom/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
 
[InstallMedia-AppStream]
name=Red Hat Enterprise Linux 8 - AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/cdrom/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

mount cdrom to /mnt/cdrom

/dev/cdrom        /mnt/cdrom        iso9660 defaults        0 0

 

yum clean all
yum makecache

# 查看仓库
yum repolist

dnf -y install 软件包名
dnf -y remove 软件包名
dnf -y update 软件包名

 Centos8 Yum

cd /etc/yum.repos.d/
rm -f CentOS-Base.repo CentOS-AppStream.repo CentOS-PowerTools.repo CentOS-centosplus.repo CentOS-Extras.repo
curl -o CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
yum makecache

 



posted on 2020-06-15 21:19  InnoLeo  阅读(414)  评论(0编辑  收藏  举报