首页 > 其他 > 详细

OS:Redhat8.4 本地源配置

时间:2021-05-26 23:22:21      阅读:27      评论:0      收藏:0      [点我收藏+]

redhat8.4 本地源配置(redhat-local.repo)

 

 

 


一、配置软件仓库(软件仓库位置:/media/redhat)

 


1、建立目录 “redhat” 。
(建立目录命令:mkdir   -p    /media/redhat)

 


2、挂载光盘“rhel-8.4-x86_64-dvd.iso”。

 


3、将光盘文件夹“AppStream”、“BaseOS” 复制到 “/media/redhat”目录。
(复制文件夹命令:cp   -r    AppStream/ BaseOS/     /media/redhat )

 

 

 

 

二、配置软件仓库文件(/etc/yum.repos.d/)

 


1、查看本地源配置文件:

 


[root@redhatos ~]#  cat     /etc/yum.repos.d/redhat-local.repo
# redhat-local.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.

[local-baseos]
name=Redhat - local - BaseOS
baseurl=file:///media/redhat/BaseOS
file:///media/cdrom/BaseOS
file:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[local-appstream]
name=Redhat - local - AppStream
baseurl=file:///media/redhat/AppStream
file:///media/cdrom/AppStream
file:///media/cdrecorder/AppStream
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@redhatos ~]#

 


2、开启仓库,将 “enabled=0”, 改为“enabled=1”。

 

 

 


三、测试本地源仓库:


[root@redhatos ~]# dnf clean all
13 files removed
[root@redhatos ~]# dnf makecache
Redhat - local - BaseOS 69 MB/s | 2.3 MB 00:00
Redhat - local - AppStream 82 MB/s | 6.8 MB 00:00
Last metadata expiration check: 0:00:02 ago on Wed 26 May 2021 05:15:39 PM CST.
Metadata cache created.
[root@redhatos ~]# dnf grouplist
Last metadata expiration check: 0:00:12 ago on Wed 26 May 2021 05:15:39 PM CST.
Available Environment Groups:
Server with GUI
Server
Minimal Install
Custom Operating System
Virtualization Host
Installed Environment Groups:
Workstation
Installed Groups:
Development Tools
Available Groups:
Legacy UNIX Compatibility
Container Management
.NET Core Development
Graphical Administration Tools
Headless Management
Network Servers
RPM Development Tools
Scientific Support
Security Tools
Smart Card Support
System Tools
[root@redhatos ~]#

[root@redhatos ~]# dnf groupinstall ‘Development Tools‘

 

 

OS:Redhat8.4 本地源配置

原文:https://www.cnblogs.com/lnlidawei/p/14815277.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!