Monthly Archives: March 2010

The easy (ok, easier) way to installing Oracle

From searching the web, it’s apparent that even installing Oracle on Linux can be a challenge for many people.  Sure, there’s OFA (Oracle Flexible Architecture), best practices, mount points, file system types and all the lot.  You can always find a way to make things a little bit better or more complex.

I want to start off with something a little more basic.  I want to talk about the basic Oracle install.

The general steps are to create a software owner (such as the user oracle) and a owner group (dba is pretty common) and, in the case of 11g, possibly things like ASM owner groups.  Then you’ve got the actual runInstaller where you choose the disk locations, software components, etc.  Part of what the Oracle installer does is to verify your system requirements:

  • are you on a supported OS?
  • do you have the required software packages (rpms)?
  • do you have enough swap?
  • do you have shared memory correctly configured?

Oracle has made things easier with configuring all this stuff over the years, but there’s always room for improvement.

To help verify you have all the requisite software packages, Oracle publishes a special rpm called oracle-validated .  This RPM will verify you have all the pre-requisite RPMs you need to install Oracle and will set the shared memory configured correctly.  You can find the latest versions of this rpm at

  • Redhat (RHEL), Centos, Oracle (OEL) Linux 4 at http://oss.oracle.com/el4/oracle-validated/
  • Redhat (RHEL), Centos, Oracle (OEL) Linux 5 at http://oss.oracle.com/el5/oracle-validated/

(Note that in the case of RHEL 4, you need to use rpm -ivh filename.rpm  instead of yum install filename.rpm like shown below)

Just choose the version you need and you can download and install it from the command line.

wget http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-18.el5.x86_64.rpm

yum install oracle-validated-1.0.0-18.el5.x86_64.rpm

These days pretty much all new installs of Oracle for enterprise use are being done with Oracle 11gR2 (11.2.0.1) on RHEL 5 (5.4) 64-bit.  Which would be the RPM I’ve listed above.  The thing is, if you check, that RPM came out in March of 2009.  It’s now been a year.  The RPM works great for 11gR1 (11.1.0.6 / 11.1.0.7) installations but misses some things needed for 11gR2.  11gR2 was released in October of 2009.  I’ve asked in the support forums and have been told Oracle is still working on an updated version for 11gR2, Oracle’s flagship product.   To me it seems you’d get the helper rpm released around the same time as the database to help speed adoption and reduce support calls, but whatever.  Heck, why not even provide the rpm with the Oracle database software itself? Maybe it has to do with the GPL and distributing software.  Who knows.

Now, in the dark days before OEL or RHEL 5, any rpms that were missing needed to be installed by hand.  With OEL/RHEL5, you now have yum which will automatically analyze and offer to install any necessary dependencies.  If you utilize a subscription such as Oracle’s ULN (Unbreakable Linux Network) or RHN (Redhat Network) you can grab all these RPMs as needed right from the source and get the latest version.  If you don’t have a subscription, or due to security you can’t allow the database server to get to the internet, you can create your own local repository.  I’ll cover setting up a local repository in another post.

So at this point you’ve gotten oracle-validated rpm installed and hence all your RPM pre-reqs installed.  What about your shared memory (shmmax, etc) parameters configured?  Oracle makes this easy too.  Once you have the rpm installed, issue the following as root:

cd /etc/sysconfig/oracle-validated
./oracle-validated-verify

This goes out and makes many of the changes necessary for Oracle to run.   You can review what was run and changed by issuing:

more /var/log/oracle-validated/results/orakernel.log

Unfortunately, there are a few more parameters you’ll need to add that the rpm misses or gets wrong due to changing best practices from Oracle.

vi /etc/sysctl.conf
change net.core.rmem_default = 262144 to
net.core.rmem_default = 4194304
sysctl -p
vi /etc/pam.d/login
add if missing
session  required   /lib/security/pam_limits.so
session  required   pam_limits.so

At this point you’re ready to start the Oracle software installer and you should be good to go.

To summarize, for a vanilla RHEL 5 box to install 11gR1, here’s the steps you need to perform after installing the OS:

useradd oracle
groupadd dba
usermod -G dba oracle

cd /tmp
wget http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-18.el5.x86_64.rpm
yum install oracle-validated-1.0.0-18.el5.x86_64.rpm –nogpgcheck

cd /etc/sysconfig/oracle-validated
./oracle-validated-verify
more /var/log/oracle-validated/results/orakernel.log
more orakernel.log

vi /etc/sysctl.conf
change net.core.rmem_default = 262144 to
net.core.rmem_default = 4194304
sysctl -p
vi /etc/pam.d/login
add if missing
session  required   /lib/security/pam_limits.so
session  required   pam_limits.so

Have fun!

Test lab

These days I’m waiting on my functional users to finish testing a large upgrade of our Oracle Apps environment.  So far *fingers crossed*, they have yet to find many issues that require my time, so I’m having plenty of time to work on side projects.

This past week I build up a VMWare test lab with some de-commissioned hardware we had lying around.  The test lab consists of

  • Dell 2950 with 4 cores and 16GB of RAM, 300GB RAID 5 local storage
  • Dell 2850 with 4 cores and 9GB of RAM, 300GB RAID 5 local storage
  • Iomega Storcenter ix4-200d  2.7TB RAID5 NAS storage (NFS / iSCSI)
  • ESX 4.0 (vSphere) plus all patches thru 3/17/10
  • vCenter 4.0

I admit, for de-commissioned hardware, it’s still a pretty powerful little cluster.

We’re about 3/4 of the way thru our upgrade from ESX 3.5 to vSphere on both our primary cluster and our DR (Disaster Recovery) cluster.  At this point we’ve got all the ESX hosts upgraded to vSphere.  The next steps are to get those hosts with all the latest ESX patches and then update the VMWare tools (which will cause a momentary downtime for the network of the VM) and the VM hardware layer (which requires the VM be shut down) of each VM running in the cluster.  Due to business requirements for when we can bounce certain VMs, this is a process that will take a week or two to get done.

In addition to our primary and DR clusters, we also have 6 standalone ESX 3.5 boxes with no shared storage.  Some of these run somewhat critical virtual machines and so minimizing downtime is important.  That’s where the test lab is coming in.

Besides providing a non-production environment for me to learn and test out various things with VMWare, I’m utilizing the Iomega StorCenter as shared storage.  The plan is as follows.

  1. Add the NFS Share on the StorCenter to the ESX 3.5 Server.
  2. Utilize Storage Vmotion to move the datastore for the VMs on the ESX 3.5 Server to shared storage
  3. Utilize Vmotion to move the running VM from the ESX 3.5 Server to the ESX 4.0 Servers.

So far, no downtime.

Once we’ve moved all the VMs off the standalone ESX 3.5 server, we’ll upgrade the various BIOSs / Firmwares on the ESX host and then install a fresh and fully patched version of vSphere.  Then we’ll re-attach it to the shared storage and move our VMs back.  Finally, we’ll schedule downtime with the respective business owners of those VMs for some downtime to upgrade the VMWare tools and the VM hardware version.

It’s a good little project that lets us leverage many of the cool features in VMWare and should provide quite the fun learning experience.

And for those of you scratching your head and wondering why we are choosing to run somewhat critical VMs on only localized storage – we’re finishing up an expansion of our server room and upgrading to a larger SAN so we can eventually store those VMs in the SAN.  The StorCenter might be used once we’ve upgraded all these standalone ESX boxes as a temporary home, but we’ll have to see.

And so it begins…

My goal with this blog is to talk about and document various things I find interesting in my professional life.  My day job has me working primarily for a bio-tech company in Austin, TX.  I’m the Senior Oracle Apps DBA and Linux Administrator.  I manage all the company’s Linux and Oracle systems, and I’m also growing into a role of one of the two primary VMWare administrators.  It keeps me busy but provides lots of opportunities to grow and learn.