Tuesday, June 15, 2010

YAIG - Yet another Oracle Database 11g R2 on Ubuntu 10.04 (Lucid) Installation Guide

Rather than re-inventing the wheel, this is my experience installing the oracle database 11gR2 on a 'virgin' ubuntu 10.04 32bit guest OS on vmware workstation, using the steps found here http://www.pythian.com/news/13291/installing-oracle-11gr2-enterprise-edition-on-ubuntu-10-04-lucid-lynx/, which in turn was based on the good work done here http://www.pythian.com/news/2329/installing-oracle-11gr1-on-ubuntu-904-jaunty-jackalope/.

I have tested the steps and found the following additional works are needed. The installation of the guest OS has on the vmware workstation been 'vanila', accepted all default settings.

VM hardware configurations:
RAM = 1048MB (1024MB doesn't work, failed the oracle installer pre-req check)
Vdisk = 20GB
CPU = 1
Core = 1

Additional step 1 - Fix the swap space
Oracle installer complained that I do not have enough swap space. The default is only around 850MB while the doco says 1.5GB of swap space is required for RAM between 1GB to 2GB (section 2.2.1 Memory Requirements of Oracle database installation guide). To setup additional swap space, follow the instruction in http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

How-To
# dd if=/dev/zero of=/swapfile1 bs=1024 count=1572864

note: 1.5GB = 1024MB + 512MB = 1536MB (1024 * 1536MB = 1572864 block size)

# mkswap /swapfile1
# swapon /swapfile1

to mount on startup, edit the fstab file
# vi /etc/fstab

add the following line
/swapfile1 swap swap defaults 0 0

reboot the system. Or simply run these commands in the said order.

# swapoff -a
# swapon -a

Additional step 2 - The run level
Bump up the runlevel from 2 to 3. The default run level for ubuntu is 2. According to the doco, run level 2 up to 5 in ubuntu are the same. This step is just to make the installer happy.

How-To.
Issue the following command as root. 

# init 3

Additional step 3 - Kernel Parameters
The pre-req also fails one of the recommended kernel parameters. It seems that the installer is taking the required value literally even if the configured value is larger than the recommended ones.

It says:
This is a prerequisite condition to test whether the OS kernel parameter "ip_local_port_range" is properly set. (more details)
Expected Value
 : between 9000 & 65500
Actual Value
 : between 9000 & 65535

Obviously to make the installer happy again, we will need to change the /etc/sysctl.conf again. 

Changing from

net.ipv4.ip_local_port_range = 9000 65535

to

net.ipv4.ip_local_port_range = 9000 65500

should suffice.

Additional step 4 - Limits
The same thing as in step 3 needs to happen to /etc/security/limits.conf

The pre-req statuses:

This is a prerequisite condition to test whether the hard limit for "maximum open file descriptors" is set to at least 65536. (more details)
Expected Value
 : 65536
Actual Value
 : 65535

This is a prerequisite condition to test whether the soft limit for "maximum open file descriptors" is set to at least 1024. (more details)
Expected Value
 :  1024
Actual Value
 :  1023

This is a prerequisite condition to test whether the hard limit for "maximum user processes" is set to at least 16384. (more details)
Expected Value
 :  16384
Actual Value
 :  16383

We need to fix all of that. It is weird, but the fix is easy. The root cause? I don't know.

oracle soft nproc 2047
oracle hard nproc 16384  #(was 16383)
oracle soft nofile 1024 #(was 1023)
oracle hard nofile 65536 #(was 65535)

Until you see a list of 'Failed' status with regards to missing package, you should be able to safely check the 'ignore' box and proce installation. They are ignorable as stated in the cvu_prereq.xml. (yeah, the standalone installation appears to be using the pre-req definition file which is part of the 'cluster verification utility')

My screen looked like this before I proceed with success.

Lastly, if you have elected to create a new database instance during installation and if you want to install RCU (repository creation utility) for the SOA suite on this instance, you must use AL32UTF8 as the character set encoding.
After the installation, you can try to startup the dbconsole. One of the internet forums also suggested that you need to change the emctl script (located in /$ORACLE_HOME/bin/) to use the bash shell, else you will see error like ulimit: 25: bad number if you attempt to start the dbconsole.

To start the Enterprise Manager, just type the following command as oracle user.

oracle@oradb-lucid:~$ emctl start dbconsole

For Oracle RCU installation on this database instance, please refer to this article.

No comments:

Post a Comment