联网配置yum 源,亲测好用!!!
红帽8中yum源配置
1、dnf源文件下载
使用的是清华大学开源软件镜像站:https://mirrors.tuna.tsinghua.edu.cn/
2、dnf源配置
rhel8系统安装完成,在红帽8主机中进行如下配置:
① 使用vim编辑器打开软件源
[root@localhost ~]# vim /etc/yum.repos.d/rhel-8-beta.repo
② 具体配置如下:
[rhel-8-baseos-beta-source-rpms]
name = Red Hat Enterprise Linux 8 - BaseOS Beta (Source RPMs)
baseurl = https://downloads.redhat.com/redhat/rhel/rhel-8-beta/baseos/source/
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-8-for-x86_64-baseos-beta-rpms]
name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta (RPMs)
baseurl = https://downloads.redhat.com/redhat/rhel/rhel-8-beta/baseos/x86_64/
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-8-appstream-beta-source-rpms]
name = Red Hat Enterprise Linux 8 - AppStream Beta (Source RPMs)
baseurl = https://downloads.redhat.com/redhat/rhel/rhel-8-beta/appstream/source/
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[rhel-8-for-x86_64-appstream-beta-rpms]
name = Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs)
baseurl = https://downloads.redhat.com/redhat/rhel/rhel-8-beta/appstream/x86_64/
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
修改完成后,进行元数据缓存后即可使用。
[root@localhost ~]# dnf clean all
[root@localhost ~]# dnf makecache
此时用yum install xxx 可以实现package 安装!
————————————————
参考文章:
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/itcast_cn/article/details/87179791
————————————————