How to use a RHEL DVD as a software repository for installs while on an isolated (or off) network.
Prerequisite
Ensure you know what version of OS you have. For DVS equipment, as of this writing, it will most likely be either RHEL5.3 or RHEL6.2. To find out, you can cat /etc/issue
:
[root@host ~]# cat /etc/issue Red Hat Enterprise Linux Server release 6.2 (Santiago) Kernel \r on an \m
Mount the Media
You can use either a physical DVD or an ISO file. This guide will outline using an ISO since many systems do not come with a DVD drive.
Using the mount option for loopback you can mount the ISO as you would anything else. In this example I will use an ISO contained in a CIFS/SMB share that is amounted at /media/srvr/
, the ISO path is /media/srvr/ISOs/OSs/rhel_62x86_64.iso
and will be mounted based on the repo named rhel62-dvd
:
NOTE: from the following, make the mount point /media/RHEL_6.2 x86_64
[root@host ~]# cat /etc/yum.repos.d/rhel62-dvd.repo [rhel62-dvd] name=Red Hat Enterprise Linux 6.2 DVD baseurl="file:///media/RHEL_6.2 x86_64" enabled=0
... make the mount point and mount the ISO loopback.
[root@host ~]# mkdir /media/RHEL_6.2\ x86_64/ [root@host ~]# mount -o loop /media/srvr/ISOs/OSs/rhel_62x86_64.iso /media/RHEL_6.2\ x86_64/
Install the Software Package
Now you may be trying to install something that is found within the repo like ipmitools or maybe you are installing something like TeamViewer8 and need to resolve some dependancies, either way, you can now use the DVD/ISO as a repo.
To install a standard program you should be able to use a standard yum format and include the option for enabling the repo:
[root@host ~]# yum install ipmitool --enablerepo=rhel62-dvd Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ipmitool.x86_64 0:1.8.11-12.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================== Package Arch Version Repository Size ====================================================================================================================== Installing: ipmitool x86_64 1.8.11-12.el6 rhel62-dvd 324 k Transaction Summary ====================================================================================================================== Install 1 Package(s) Total download size: 324 k Installed size: 1.0 M Is this ok [y/N]:
... or installing a package you have an RPM for using the yum localinstall
option:
[root@host ~]# yum localinstall teamviewer_linux.rpm --enablerepo=rhel62-dvd --nogpgcheck Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Setting up Local Package Process Examining teamviewer_linux.rpm: teamviewer-8.0.20931-1.i686 Marking teamviewer_linux.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package teamviewer.i686 0:8.0.20931-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================== Package Arch Version Repository Size ====================================================================================================================== Installing: teamviewer i686 8.0.20931-1 /teamviewer_linux 59 M Transaction Summary ====================================================================================================================== Install 1 Package(s) Total size: 59 M Installed size: 59 M Is this ok [y/N]:
0 Comments