A. Yum
Server
1. Install package httpd, createrepo
2. Mount iso image for rhel8, edb4rhel8
[root@yum-server conf.d]# df –h
…
/dev/loop1 13G 13G
0 100% /edb
/dev/loop2 14G 14G
0 100% /rhel8
3. Copy all files from mount disks to repository
[root@yum-server ~]# cp -r /rhel8/* /source/www/html/repo
[root@yum-server ~]# cp -r /edb/* /source/www/html/repo/EDB
4. Create Repository Metadata
[root@yum-server ~]# createrepo /source/www/html/repo/BaseOS
[root@yum-server ~]# createrepo /source/www/html/repo/AppStream
[root@yum-server ~]# createrepo /source/www/html/repo/EDB
[root@yum-server ~]# ls -l /source/www/html/repo
total
400
dr-xr-xr-x
4 root root 4096 Jun 5 09:14 AppStream
dr-xr-xr-x
4 root root 4096 Jun 5 09:13 BaseOS
drwxr-xr-x
4 root root 331776 Jun 5 09:24 EDB
dr-xr-xr-x
3 root root 4096 Jun 5 08:59 EFI
-r--r--r--
1 root root 8154 Jun 5 09:05 EULA
-r--r--r--
1 root root 1455 Jun 5 09:05 extra_files.json
-r--r--r--
1 root root 18092 Jun 5 09:05 GPL
dr-xr-xr-x
3 root root 4096 Jun 5 09:05 images
dr-xr-xr-x
2 root root 4096 Jun 5 09:05 isolinux
-r--r--r--
1 root root 104 Jun 5 09:05 media.repo
drwxr-xr-x
2 root root 4096 Jun 5 09:30 repodata
-r--r--r--
1 root root 1669 Jun 5 09:05 RPM-GPG-KEY-redhat-beta
-r--r--r--
1 root root 5135 Jun 5 09:05 RPM-GPG-KEY-redhat-release
-r--r--r--
1 root root 1796 Jun 5 09:05 TRANS.TBL
5. Configuring Local Repository
[root@yum-server ~]# ls -l /etc/yum.repos.d/
…
-rw-r--r--
1 root root 504 Jun 5 09:23 rhel8.repo
-r--r--r--
1 root root 5135 Jun 4 13:40
RPM-GPG-KEY-RHEL8 (copy from RPM-GPG-KEY-redhat-release and rename)
[root@yum-server ~]# vi /etc/yum.repos.d/rhel8.repo
[rhel8u10_baseos]
name=Local
- Red Hat Enterprise Linux 8.10 - BaseOS
baseurl=file:///source/www/html/repo/BaseOS/
gpgkey=file:///etc/yum.repos.d/RPM-GPG-KEY-RHEL8
gpgcheck=1
enabled=1
[rhel8u10_appstream]
name=Local
- Red Hat Enterprise Linux 8.10 - Appstream
baseurl=file:///source/www/html/repo/AppStream/
gpgkey=file:///etc/yum.repos.d/RPM-GPG-KEY-RHEL8
gpgcheck=1
enabled=1
[edb4rhel8]
name=Local
- Enterprise Database for RHEL8/OL8
baseurl=file:///source/www/html/repo/EDB/
gpgcheck=0
enabled=1