Tuesday, January 15, 2013

Set up Yum for Oracle Linux

When looking for the latest server and packages updates you can use Oracle’s free yum repository or purchase a support license from $119-$1399. Support license vary in level of support but also provide additional Oracle specific packages. This tutorial walks through setting up the free yum repository to upgrade and add packages. One of the main benefits of yum is it’s ability to not only upgrade the package you have selected but it’s dependencies as well.

Oracle Linux Library
Oracle Linux Admin Guide
Yum Documentation

Step 1. Configure yum repository
cd /etc/yum.repos.d
## wget http://public-yum.oracle.com/public-yum-<release>.repo
wget http://public-yum.oracle.com/public-yum-ol6.repo
Step 2. Verify base yum channel is enabled
vi public-yum-ol6.repo
Verify that the latest is enabled by checking the “enabled” flag is set to 1 on the first entry “ol6_Latest”.
Step3. (optional) If you are using the UEK kernel you can enable the latest UEK kernel and UEK base repositories.
Step 4. Check yum channels are configured correctly
After verifying all repositories are enabled run a check.
yum list
A list of the Linux packages in the repositories you have selected should come back.
Step 5. Run test Install
Run a test by installing Firefox
I recommend using Firefox as a Linux browser since it will be the most supported browser for Linux.
yum install firefox -y
Agree to install, or if Firefox is already installed, it will say nothing to be done.
Step 6. Install Latest kernel headers for driver compatibility
I recommend install the gcc, kernel-headers and kernel-devel for modules which require kernel headers.

yum install kernel-uek-headers kernel-uek-devel gcc –y

Step 7. (optional) Install System Admin tools
(optional) Basic packages that will help administer the server. These packages are not required for Oracle to run properly but I will reference them in future tutorials and they provide some good testing and notification tools for the system admin.

yum install sendmail tigervnc tigervnc-server-module tigervnc-server nmap vsftpd net-snmp net-snmp-utils yum-plugin-security ethtool net-tools lsscsi device-mapper-multipath -y

Step 8. Update All packages for the yum repository
Linux adds new security patches and standard bug fixes almost daily. Even a new release will have many fixes within just a couple days, so your iso downloaded install should always be updated prior to running your new system.
update your current packages
yum update -y
Agree to install.