One of the new requirements of the Exadata Storage Server patches (starting with 18.104.22.168.0) 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
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 22.214.171.124.0 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 REP_BASE=/archive2/software/linux/yum
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:
Options Indexes FollowSymLinksAlias /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.