otn_logo_small
This is my first attempt at Oracle 11g with Linux. As I’m still waiting for the 11G R2 to be released on Solaris, I managed to have a try on a Linux VM.

First, get VirtualBox
Then, get a Fedora 11 image
You may also need a « z7″ compressor to un-z7 the image. You can get 7za from the Macports

# port install p7zip
# 7za e fedora-11-x86.7z

7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=utf8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: fedora-11-x86.7z

Extracting Machine/fedora-11-x86/fedora-11-x86.xml
Extracting VDI/fedora-11-x86.vdi
Extracting VDI
Extracting Machine/fedora-11-x86
Extracting Machine

Everything is Ok

Folders: 3
Files: 2
Size: 4740698220
Compressed: 1148257214

Then configure and start the VM. I had to add 3 NICs, so I have 4 network interfaces, enough to play. I also set the first one as Bridge instead of the default NAT, so my VM have a real IP.
I then have to log as root, chance the /etc/sudoers so Wheel users can sudo. Then I added fedora (default user) to Wheel group in /etc/groups.
Now I can sudo. We are close to be able to install Oracle database. While I’m at it, go to Oracle website and download the 2 install zip files. This is quite huge, around 2.1Gb. Be carefull when you unzip (not yet), as everything lives in the « database » folder…
You will also need the Grid Infrastructure Software.
Please note we are installong the 32bits versions, but the 64bits version is the same, only the packages to download are different. Click on the « view all » to get the Grid Infrastructure Software.

For Oracle 11G R2 to work on linux you need to fulfill some dependencies, starting with some RPM packages. Use ‘yum’ to search for them and install them. Here is a list according to Oracle Linux recommendations :

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)

11G R2 now comes with a « bundeled NTP server », I mean, Oracle now can sync the time of every node in the cluster. No need of NTPD, and no evictions due to bad Solaris xntpd server. Just disable ntpd or ensure it’s not running before installing Oracle database.
Also, configure SSHD and kernel parameters, if needed, as Oracle prerequisite.
Now, let’s go with Oracle. Create an oracle user with :

adduser oracle
passwd oracle (give a password)

As root, create a /opt/oracle folder and give RWX rights to oracle user.
Create a SSL key for user Oracle, add your personal public key to authorized_keys and log as oracle user. Copy the Oracle install files to the home dir of this user.

mkdir /opt/oracle
chown oracle /opt/oracle
su – oracle
ssh-keygen -f dsa
(set empty password and write the key in .ssh folder)
vi .ssh/authorized_keys
(copy the pubkey of your admin user)
unzip linux.x64_11gR2_grid.zip
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
cd database

Log-in again with your oracle user, setting X11 forwarding (use -X -Y if you are using a mac) :

ssh -X -Y oracle@your_host
cd grid

cd database
./runInstaller

Starting Oracle Universal Installer…

Checking Temp space: must be greater than 80 MB. Actual 9828 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1023 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-09-18_09-47-50AM. Please wait …[oracle@localhost database]$ Xlib: extension « Generic Event Extension » missing on display « localhost:10.0″.

Don’t take account for X11 errors, as long as you have the install window.
First question is giving out your email address for security updates… As you ARE a good DBA/Sysadmin, you won’t need this. Click next :)

As I don’t have time and I KNOW I will not do better, check there for some more informations on installing Oracle 11G R2 RAC ASM.