OS:Redhat8.4 本地源配置

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'

 

 

上一篇:[2021 Spring] CS61A Project 1: The Game of Hog (Phase 3)


下一篇:Oracle获取干净的建表DDL语句,不含其它存储、表空间、段属性