Yum Repository for Oracle Enterprise Linux

By | March 8, 2012

One of the new requirements of the Exadata Storage Server patches (starting with is that the compute nodes will be patched through yum.  Previously, the minimal pack was bundled with the storage server patch and applied directly to the database servers.  Instead of having the compute node directly receive updates from Oracle’s yum repository (the Unbreakable Linux Network – ULN), it is recommended to configure a local yum repository that will download the RPMs from ULN.  After this is done, all local servers will connect to the yum repository to receive RPM patches, saving time and network bandwidth.  This post will describe how to configure the yum repository on Oracle Enterprise Linux (process borrowed from OTN).

Creating a yum repository does not require any additional license other than a ULN subscription (included with Exadata or any OEL support contract) unlike RedHat’s Satellite product, which can be quite pricey.  First, you will need a server running Oracle Enterprise Linux.  If you don’t have anything running OEL, check out Tim Hall’s great site – oracle-base.com for a quick primer on installing OEL.  After you have a server up and running with OEL, you’ll need to register it with the ULN.  This requires a CSI – included with an OEL license.  To do this, run:

rpm --import /usr/share/rhn/RPM-GPG-KEY
up2date --nox --register


1.  Accept the privacy policy


2. Enter the ULN credentials and OEL CSI


3.  Give the system a profile name and choose whether you want to upload the system information


4.  Choose whether to include the RPMs installed on the system in the ULN profile


5.  Click next


6.  Wait for the profile to be sent


7.  Click finish


After this is done, your system is registered in ULN.  Log in to http://linux.oracle.com and it should be listed under the systems tab.  In the picture below, we have 2 Exadata compute nodes and 1 server (homer.enkitec.com) that will be our yum server.

1. Click on the pencil next to the server that will host your yum repository to edit the configuration


2.  Check the “Yum Server” box and apply the changes


3.  Click on the system name to select the channels it will subscribe to


4.  Click “Manage Subscriptions”


5.  Select the channels that the yum repository will host.  For Exadata compute nodes, the minimum channels are Enterprise Linux 5 Add ons (x86_64), Exadata release db server installation packages (x86_64), and Oracle Linux 5 Latest (x86_64).  Select those channels, move them to the “Subscribed Channels” list, and click “Save Subscriptions”


Now that you have a server configured as a yum repository in ULN with the appropriate channels, download the 167283.sh script from OTN and give it a more descriptive name.  I used yum_populate.sh.  It will create the yum repository in a directory you specify.  To specify the yum repository location, modify the REP_BASE entry in the script.  I used /archive2/software/linux/yum on my server:

# yum repository paths

After the script has been configured and put into place, run the script.  It will download the packages from the channels that the yum repository is subscribed to.  This could take a significant amount of time depending on your internet connection speed and the channels the server is subscribed to.  Also, you will have to allocate enough disk space for the channels you’re subscribed to.  For example, the channels shown above take up ~26GB at the time of this writing (3/8/2012).

A web server is needed to utilize the yum repository.  I used the built in Apache web server.  First, I needed to make Apache see the directory containing the yum repository.  I added the following lines to the /etc/httpd/conf/httpd.conf file:

<Directory /archive2/software/linux/yum>
  Options Indexes FollowSymLinks
Alias /yum/ /archive2/software/linux/yum/

After doing this, I needed to set Apache to start at bootup, and start the web server:

[root@homer ~]# chkconfig httpd on
[root@homer ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

Now that Apache has started, check to ensure that you’re able to view the yum repository from a web browser. Based on the Alias entry above, our site is at http://homer.enkitec.com/yum/ (note the trailing /):


Now that this is complete, you’re ready to configure your clients to connect directly to the yum repository.  Note that the repository will only be updated when the yum_populate.sh script is run.  It’s best to schedule this through cron to run a few times a week.  It’s an incremental process, so subsequent runs will only download new RPM releases.

Be Sociable, Share!

10 thoughts on “Yum Repository for Oracle Enterprise Linux

  1. George Sheppard


    I looks like you only have to have one server in the cluster setup as a YUM repository. Is that right, or do you have to install it on each?

    1. Andy Colvin Post author

      I would recommend running the yum repository outside of the Exadata entirely. Your server running ASR is a good candidate, since it’s most likely running OEL already – unless it’s running Solaris. This furthers my use case for including an OEM/ASR/RMAN catalog/yum repository server in the mix if there isn’t one already in place. Those roles can be handled by one server in many environments, and they’re all “management” type activities.

  2. Anthony

    How would you adapt the above setup and processes if the internal network has absolutely no online internet connections at all (and can never be opened to the internet); if all files from the internet (or any external source) have to be downloaded offline and then transferred on hard media (DVD, etc) into the internal network?

    1. Andy Colvin Post author

      I suppose it would be possible to copy the directory tree that was created and copy it to an internal server that doesn’t have internet access. You would still have to go through the process of configuring apache on the end repository server.

  3. Frits Hoogland

    Please mind that if you do this on an OL5/6 system, you probably need to adjust the firewall in /etc/sysconfig/iptables to get access to port 80 (which the apache/httpd server is default set to)

  4. Frits Hoogland

    Also mind that the 3 mandatory channels (Enterprise Linux 5 Add ons (x86_64), Exadata release db server installation packages (x86_64), and Oracle Linux 5 Latest (x86_64)) only takes 4.7GB

    I’ve created a virtual machine on my laptop with these yum repositories, so I can use it at a client’s site without having to install a yum server at their site. The process of fetching the rpm’s takes a long time.

  5. Ralf Moosndl

    Please, can you provide the exact size (dh -h) of the three mandatory channels in your grid repo? I did set up two different yum repos on two different servers and the sizes differ.

    Is there a good way to verify the content of the Yum Repos?


    1. Andy Colvin Post author

      The size of the channel will depend on when you last updated it. Because it is subscribed to the Oracle Linux 5 latest channel, that has all of the patches that have been released for OEL5.

  6. Martin Z

    Why are you comparing a yum repository to a satellite? There is a huge difference between them: A yum repository is just a bunch of rpms with generated metadata. Spacewalk/RH Satellite is much more than that – it’s handling patch management, reprovisioning and at some degree monitoring and configuration management.

  7. Pingback: dbnodeupdate.sh on Exadata Compute Nodes « Oracle-Ninja.com

Leave a Reply

Your email address will not be published. Required fields are marked *