0% found this document useful (0 votes)
52 views

How-To-create Local Repo OL

The document shows the configuration of a local Oracle Linux 7.9 software repository by mounting an ISO image, editing /etc/fstab to reference this mount, disabling other repositories, and creating a new YUM repository configuration file pointing to the mounted ISO image. This allows installing packages from the Oracle Linux 7.9 ISO as if it were a local repository.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

How-To-create Local Repo OL

The document shows the configuration of a local Oracle Linux 7.9 software repository by mounting an ISO image, editing /etc/fstab to reference this mount, disabling other repositories, and creating a new YUM repository configuration file pointing to the mounted ISO image. This allows installing packages from the Oracle Linux 7.9 ISO as if it were a local repository.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

[root@DPEVRST2DBH22LP var]# mkdir -p /var/OSimage/OL7.

9_x86_64
[root@DPEVRST2DBH22LP var]# mount -o loop,ro /root/OracleLinux-R7-U9-Server-x86_64-
dvd.iso /var/OSimage/OL7.9_x86_64
[root@DPEVRST2DBH22LP var]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 252G 0 252G 0% /dev
tmpfs 252G 0 252G 0% /dev/shm
tmpfs 252G 11M 252G 1% /run
tmpfs 252G 0 252G 0% /sys/fs/cgroup
/dev/mapper/ol-root 50G 6.0G 41G 13% /
/dev/mapper/ol-u01 160G 61M 152G 1% /u01
/dev/mapper/ol-home 50G 53M 47G 1% /home
/dev/sdb2 1014M 182M 833M 18% /boot
/dev/sdb1 200M 7.4M 193M 4% /boot/efi
tmpfs 51G 0 51G 0% /run/user/0
/dev/loop0 4.6G 4.6G 0 100% /var/OSimage/OL7.9_x86_64

[root@DPEVRST2DBH22LP var]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Apr 8 17:19:56 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/ol-root / ext4 defaults 1 1
UUID=0a991585-75df-489e-a693-53e64c68de19 /boot xfs defaults
0 0
UUID=C45A-68A1 /boot/efi vfat umask=0077,shortname=winnt
0 0
/dev/mapper/ol-home /home ext4 defaults 1 2
/dev/mapper/ol-u01 /u01 ext4 defaults 1 2
/dev/mapper/ol-swap swap swap defaults 0 0

[root@DPEVRST2DBH22LP var]# vi /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Apr 8 17:19:56 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/ol-root / ext4 defaults 1 1
UUID=0a991585-75df-489e-a693-53e64c68de19 /boot xfs defaults
0 0
UUID=C45A-68A1 /boot/efi vfat umask=0077,shortname=winnt
0 0
/dev/mapper/ol-home /home ext4 defaults 1 2
/dev/mapper/ol-u01 /u01 ext4 defaults 1 2
/dev/mapper/ol-swap swap swap defaults 0 0
/root/OracleLinux-R7-U9-Server-x86_64-dvd.iso /var/OSimage/OL7.9_x86_64 iso9660
loop,ro 0 0
~
~
~

[root@DPEVRST2DBH22LP var]# yum-config-manager --disable \*


[root@DPEVRST2DBH22LP OL7.9_x86_64]# cd /etc/yum.repos.d
[root@DPEVRST2DBH22LP yum.repos.d]# ls
oracle-linux-ol7.repo uek-ol7.repo virt-ol7.repo
[root@DPEVRST2DBH22LP yum.repos.d]# vi oracle-linux-ol7-local.repo
[OL79LOCAL]
name=Oracle Linux 7.9 x86_64 LOCAL
baseurl=file:///var/OSimage/OL7.9_x86_64
gpgkey=file:///var/OSimage/OL7.9_x86_64/RPM-GPG-KEY
gpgcheck=0
enabled=1
~

[root@DPEVRST2DBH22LP yum.repos.d]# yum clean all


Loaded plugins: ulninfo
Cleaning repos: OL79LOCAL
[root@DPEVRST2DBH22LP yum.repos.d]#
[root@DPEVRST2DBH22LP yum.repos.d]#
[root@DPEVRST2DBH22LP yum.repos.d]# yum repolist
Loaded plugins: ulninfo
OL79LOCAL
| 3.6 kB 00:00:00
(1/2): OL79LOCAL/group_gz
| 131 kB 00:00:00
(2/2): OL79LOCAL/primary_db
| 5.2 MB 00:00:00
repo id
repo name
status
OL79LOCAL
Oracle Linux 7.9 x86_64 LOCAL
5,210
repolist: 5,210

You might also like