This document explains how to create a local Yum Repository using an ISO image Oracle Enterprise Linux 6
- You should have already installed Oracle Enterprise Linux 6 on your machine. If you have not already done this follow Oracle Enterprise Linux 6 Installation and Setup Guide
- The system must have sufficient storage space to host a full Oracle Linux Media Pack DVD image (approximately 4 GB)
- Oracle Enterprise Linux 6 DVD image. You can download the same from the Oracle Software Delivery Cloud
Step by step tutorial of creating local yum repository.
Step 1 : Transfer the removable storage to the system on which you want to create a local yum repository, and copy the DVD image to a directory in a local file system.
Step 2 : Create a suitable mount point, for example /media/OEL/, and mount the DVD image on it using root user.
mkdir -p /media/OEL/ mount -o loop /home/vidyadhar/Downloads/V41362-01.iso /media/OEL/
Note in above /home/vidyadhar/Downloads/ path is where I have copied the ISO. Adjust the PATH as per your setup / environment.
Step 3 : Create an entry in /etc/fstab so that the system always mounts the DVD image after a reboot.
/home/vidyadhar/Downloads/V41362-01.iso /media/OEL/ loop defaults 0 0
Step 4 : Install createrepo to build repository
rpm -Uvh /media/OEL/Packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm rpm -Uvh /media/OEL/Packages/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm rpm -Uvh /media/OEL/Packages/createrepo-0.9.9-18.0.1.el6.noarch.rpm
Step 5 : To create a repository open or create Media.repo file in /etc/yum.repos.d/ location and dump following content into it. Save the file.
[OEL] name=OEL baseurl=file:///media/OEL enabled=1 gpgcheck=0
Step 6 : Clean up the yum cache by running following command
yum clean all
Step 7 : Test that you can use yum to access the repository by running following command
yum install --enablerepo=OEL file groff
Hope this helped you.