RHEL: Add DVD to YUM repository
When setting up a new server in a highly secured network, one does not always have access to the Red Hat Network to download packages for the installation of the server. Often, a local repository is provided later on in the setup process.
This leaves us with the problem of installing the necessary packages for the Oracle database. Luckily, we can use the DVD we used for the installation of the Operating System to get all required packages.
Adding the RHEL DVD to the YUM repository
Insert the Red Hat Enterprise Linux Server DVD into your DVD-ROM drive and mount it under
/media/. In my case, the DVD was automounted under
/media/RHEL_5.7 x86_64 DVD/. Then, as root, create a new file in the yum repository directory:
# vim /etc/yum.repos.d/rhel-dvd.repo
This file contains the metadata of the repository. I found a template here (check that link if you need more information about the parameters) and adapted it to fit my needs:
[rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD baseurl=file:///media/RHEL_5.7%20x86_64%20DVD/Server/ enabled=1 gpgcheck=1 gpgkey=file:///media/RHEL_5.7%20x86_64%20DVD/RPM-GPG-KEY-redhat-release
Save and close the file. Done! Now we can use
yum to install new packages and resolve dependencies. If you want to remove the DVD from the yum sources, simply change
Database installation: Installing the “oracle-validated” package
Oracle provides the
oracle-validated package to perform most of the preinstallation tasks. Oracle officially calls this package the “Oracle Validated Configuration RPM”. When it is installed, the package does the following:
To install this package, first get the oracle-validated package from the Oracle OSS homepage (either place it on the server using SCP or configure the network):
# wget http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-24.el5.x86_64.rpm
Note that the version used here is not the latest version. The RHEL 5.7 DVD does not contain the latest available dependencies, so this is the most current version that will install fine with the packages provided on the DVD. Next, import the GPG key and actually install the downloaded package:
# rpm --import http://oss.oracle.com/el5/RPM-GPG-KEY-oracle # yum localinstall oracle-validated-1.0.0-24.el5.x86_64.rpm
After the installation, execute the following command to verify and set Oracle validated configuration parameters:
After executing the script, the oracle user should now exist and most of your configuration parameters should be set to a correct value:
# id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh
You may now continue with the installation as described in the Oracle Installation Guide.