Mount the CD/DVD:  mount /dev/cdrom /mnt/cdrom

Then trick the baseurl directives to point to the file instead of Oracle’s public yum server in the /etc/yum.repos.d/public-yum-ol6.repo/public-yum-el5.repo or /etc/yum.repos.d/public-yum-ol6.repo file:

[root@ovmanager media]# mount /dev/cdrom /mnt

mount: block device /dev/sr0 is write-protected, mounting read-only
 
[oracle@ovmanager yum.repos.d]$ pwd
/etc/yum.repos.d
 
[oracle@ovmanager yum.repos.d]$ vi public-yum-el5.repo
 

[ol5_u8_base]

name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=file:///mnt/OL5.8/Server/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=0
enabled=1 

Now you are ready to install packages from your local yum repository

By Charles Kim, Oracle ACE Director

 

Posted in Linux
Share this post, let the world know

Comments are closed