IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > Linux for Power Architecture > ... > Commercial Applications > Installing Oracle Database
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
Installing Oracle Database
Added by pjuerss, last edited by pjuerss on Dec 29, 2006  (view change)
Labels: 
(None)

Installation of Oracle Database on Linux on POWER

The following sections should give you a brief overview about the preinstallation and installation tasks required to successfully install Oracle's 10gR2 database on an IBM System p5 running either Red Hat Enterprise Linux 4 (RHEL4) or Novell SUSE Enterprise Linux 9 (SLES9).

Read manual first...

Based on my experience it is quite usefull - and required - to take a look at the Oracle documentation before you start the installation. Well, if you've done hundreds of Oracle installations on other plattforms it might also be worthwhile to take some time reading - if you have the time .
Online Manual for 10gR2 on Linux on POWER

Downloading and unpacking Oracle 10gR2

You can download Oracle's 10Gr2 code for Linux on POWER from this web page:
http://www.oracle.com/technology/software/products/database/oracle10g/index.html

You can download the software directly onto the system you're planning to install Oracle or to a NFS server which makes sense if you're planning to install more than one system.
Regardless of your choice, first create a subdirectory which will contain all Installation files and change to that location. Here's an example of my NFS server:

bc1-mms:~ # mkdir -p /export/oracle/10gR2
bc1-mms:~ # cd /export/oracle/10gR2
bc1-mms:/export/oracle/10gR2 #

Follow the link named "Oracle Database 10g Release 2 (10.2.0.1.0) for Linux on Power" on the web page mentioned above and accept the license agreement. Finally download the database "10201_database_lin_ppc.cpio.gz" to a location of your choice (in my example this is /export/oracle/10gR2).

After the download has finished it's time to extract the archive. Change to the directory where you've downloaded the file and use the following commands to extract the archive

bc1-mms:/export/oracle/10gR2 # gunzip 10201_database_lin_ppc.cpio.gz
bc1-mms:/export/oracle/10gR2 # cpio -idmv < 10201_database_lin_ppc.cpio
...skipping some output here...
bc1-mms:/export/oracle/10gR2 # ls
total 888175
drwxr-xr-x  3 root   root         160 Nov 23 09:19 .
drwxr-xr-x  9 nobody nobody       240 Nov 23 09:19 ..
-rwxr-xr-x  1 nobody nobody 908559872 Jun 20  2006 10201_database_lin_ppc.cpio
drwxr-xr-x  5  51162  42424       152 Nov 16  2005 Disk1
Please note...

Don't use any other unpack options than shown here or on Oracle's documentation (f.e. gunzip -d) because this could cause the installation to fail with some very strange error messages (e.g. OUI-10133: Invalid staging area...)

Now you're ready to install Oracle Database but before this could be done we have to do some prerequisite checkings first - follow me.

Preinstallation tasks

Like any other software Oracle requires some prerequisites concerning the Operating System which must be met before the installation could occur.

Namely these are:

  • Hardware prereqs
  • Software prereqs
  • OS prereqs

Hardware prerequisites

  • The Hardware prerequisites are quite simple...you must have at least 1GB of memory available.
  • Depending on the available main memory you must configure enough swap space to the system.
    • Up to 2048MB configure 1.5 times the size of RAM as swap space.
    • Up to 8192MB configure 1 times the size of RAM as swap space.
    • Larger than 8192MB configure 0.75 times the size of RAM as swap space.
  • Take a look at the available size of /tmp it should have at least 400MB or more available.
    • If you don't have at least 400MB available in /tmp and you cannot free enough space you can either extend the filesystem (if possible) or use the TEMP and TMPDIR environment variables for the Oracle user.
  • Check for the available disk space for Oracle itself - it requires between 1.5 and 3 GB per installation and addl. 1.2 GB for a preconfigured database which uses filesystem storage (this is optional).

Software prerequisites

Oracle supports the following Linux distributions:

  • Novell SUSE Enterprise Server 9 - Service Pack 2 (SLES9-SP2) or higher
  • Red Hat Enterprise Linux 4 - Update 1 (RHEL4-U1) or higher
Please note...

I've updated the following lists with the informations from metalink note 341507.1 because the original documentation has some errors.

For RHEL4 you must install the following packages:

  • make-3.80-5 (not gmake!)
  • gcc-3.4.3-22.1
  • gcc-ppc32-3.4.3-22.1
  • gcc-c++-3.4.3-22.1
  • gcc-c++-ppc32-3.4.3-22.1
  • glibc-2.3.4-2.9
  • glibc-2.3.4-2.9 (64-Bit)
  • libgcc-3.4.3-9.EL4
  • libgcc-3.4.3-9.EL4.ppc64.rp
  • libstdc++-3.4.3-9.EL4
  • libstdc++-devel-3.4.3-9.EL4
  • libaio-0.3.103-3
  • libaio-0.3.103-3 (64-Bit)
  • libaio-devel-0.3.103-3 (64-Bit)
  • compat-libstdc++-33-3.2.3-47.3
  • binutils-2.15.92.0.2-13
  • perl-5.8.5-12.1
  • tcl-8.4.7-2
  • unzip-5.51-7
  • zip-2.3-27
  • tar-1.14-4

For SLES9 you must install the following packages:

  • gcc-3.3.3-43.34
  • gcc-64bit-9-200505240008
  • gcc-c++-3.3.3-43.34
  • glibc-2.3.3-98.47
  • glibc-64bit-9-200506062240
  • libgcc-3.3.3-43.34
  • libgcc (64-bit) 9-200505240008
  • libstdc++-3.3.3-43.34
  • libstdc++-devel-3.3.3-43.34
  • libaio-0.3.102-1.2
  • libaio-64bit-9-200502241152
  • libaio-devel-0.3.102-1.2
  • libaio-devel-0.3.102-1.2 (64-bit)
  • binutils-2.15.90.0.1.1-32.10
  • binutils-64bit-9-200505240008
  • make-3.80-184.1 (not Gmake-3.80-184.1)
  • perl-5.8.3-32.4
  • tcl-8.4.6-26.3
  • unzip-5.50-345.1
  • zip-2.3-732.4
  • tar-1.13.25-325.3

Check if you've already installed all required packages or - if not - install them.

In addition Oracle requires the IBM XLC Runtime Environment which can be downloade here
Don't forget to download and install the XL Optimization Libraries component from this link!!!

Finally you can use the following optional JDK versions with the Oracle JDBC/OCI drivers. They are not required for the installation because the Oracle Universal Installer (OUI) comes with its own Java or in other words, IBM Java 1.4.2 32-bit will be automatically installed.

  • IBM Java 1.4.2 64-bit (SR1a) or later
  • IBM Java 1.4.2 32-bit (SR1a) or later
  • IBM Java 1.3.1 32-bit (SR8) or later (for SLES 9 only)

You can download the JDKs here.

Operating system prerequisites

Assuming you've enough free memory and disk space and all required packages are installed there are still some things to do.

First make sure that the network setup is OK. To avoid installation failures it is adviseable to configure /etc/hosts regardless how good your DNS is actually working.

So check /etc/nsswitch.conf like shown below.

bc1-js21-1-lpar2:~ # cat /etc/nsswitch.conf | grep hosts
hosts:          files dns

It says that the order for name resolution is /etc/hosts first and then DNS.

Check your /etc/hosts file if it is setup correctly - and if not, correct it.

bc1-js21-1-lpar2:~ # cat /etc/hosts
...skipping some output here...
127.0.0.1       localhost.localdomain  localhost
9.154.2.118     bc1-js21-1-lpar2.stuttgart.de.ibm.com  bc1-js21-1-lpar2

If you have more than one network card in the system using more than one hostname the Oracle Installer could get confused or let's say will probably choose the wrong values for its network setup. The installer will first check for the ORACLE_HOSTNAME variable and if not set it will take the first entry from /etc/hosts. In this environment set ORACLE_HOSTNAME to the fully qualified hostname you want to use!

Finally check your /etc/resolv.conf if it has an entry like domain=my.domain.com - e.g. domain=stuttgart.de.ibm.com. If it has then change it to search=my.domain.com - e.g. search=stuttgart.de.ibm.com. Otherwise your installation will fail during the network setup.

Now you've checked your network and assume it is ok, it's time to create the required groups and users. Oracle requires three groups:

  • dba - for users with database administrative rights
  • oper - for users with limited admin rights
  • oinstall - owns the Oracle inventory which means keep track on what Oracle software is installed

Then you must create at least one user which owns all Oracle software. It must have oinstall as primary and dba and oper as supplemental groups. Here's an example:

bc1-js21-1-lpar2:~ # groupadd -g 200 oinstall
bc1-js21-1-lpar2:~ # groupadd -g 201 dba
bc1-js21-1-lpar2:~ # groupadd -g 202 oper
bc1-js21-1-lpar2:~ # useradd -u 200 -g oinstall -G dba,oper -m -p '$1$stZPv2Dd$7/1Y/VX5TF2r6vSMBR91q1' oracle
Tip!

The option -p gives you the possibility to assign a password to a new user during its creation with useradd. This is very comfortable when you use it in scripts The password string of course should be crypted - this could be done with the command openssl.
The following example creates a MD5 crypted password string where the password itself is oracle:
bc1-js21-1-lpar2:~ # openssl passwd -1 oracle
$1$FgWroiFf$EAjd8hMWnJxEIkcl1IRx30

Setting kernel parameters and the Oracle user environment

Ok, now we know the Hardware is sufficent, including SWAP space and /tmp space, the required addl. SW packages are installed, our network is setup correctly and the required user and groups are in place, we must setup some Linux kernel parameters and the user environment in order to get Oracle installed. I will not explain each and every parameter here - have a look at the kernel documentation!

First let's have a look at the required kernel settings.

Please note...

Oracle states, that "The kernel parameter and shell limit values shown in the following section are recommended values only. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system. Refer to your operating system documentation for more information about tuning kernel parameters." (taken from the Oracle Database Installation Guide).

Here's a list of the recommended kernel parameter and their recommended values:

  • kernel.shmall = 2097152
  • kernel.shmmax = HALF SIZE OF PHYSICAL MEMORY IN BYTES
  • kernel.shmmni = 4096
  • kernel.sem = 250 32000 100 128
  • fs.file-max = 65536
  • net.ipv4.ip_local_port_range = 1024 65000
  • net.core.rmem_default = 1048576
  • net.core.rmem_max = 1048576
  • net.core.wmem_default = 262144
  • net.core.wmem_max = 262144

Check the above values using the sysctl command. If any of the above parameter has a larger value, KEEP IT!
To adjust the parameter and make them persistent add them to /etc/sysctl.conf. After that, use sysctl -p to activate the parameter.

bc1-js21-1-lpar2:~ # cat /etc/sysctl.conf
# Disable response to broadcasts.
# You don't want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
# enable ipV6 forwarding
#net.ipv6.conf.all.forwarding = 1
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
bc1-js21-1-lpar2:~ # sysctl -p /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
Please note...

On SLES9 systems you must run chkconfig boot.sysctl on in order to load the parameter on a system reboot!

Now it's time to increase the shell limits for the oracle user.

  • Add the following lines to the /etc/security/limits.conf file:
    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  1024
    oracle              hard    nofile  65536
  • Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
    session    required     /lib/security/pam_limits.so
  • For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE systems /etc/profile.local):
    if [ $USER = "oracle" ]; then
                        if [ $SHELL = "/bin/ksh" ]; then
                              ulimit -p 16384
                              ulimit -n 65536
                        else
                              ulimit -u 16384 -n 65536
                        fi
                fi

Creating the required directories

Oracle requires the following directories to be created before the installation:

  • ORACLE_BASE
  • ORACLE_INVENTORY
  • ORACLE_HOME

The ORACLE_BASE directory is the top directory for the installation. In fact normally ORACLE_INVENTORY and ORACLE_HOME are located somwhere here. Oracle itself recommends the following strukture:

  • /mount_point/app/oracle_sw_owner

The mount_point can be anywhere in your filesystem - e.g. /opt or /u01. The oracle_sw_user is the user you've created earlier - e.g. oracle. Let's make an example:

The ORACLE_HOME directory specifies the directory where you actually install the software. It is normaly somwhere under ORACLE_BASE, for example:

  • /ORACLE_BASE/product/10.2.0.1/rdbms

This says that my ORACLE_HOME is at /opt/oracle/app/oracle/product/10.2.0.1/rdbms - and the software will be installed there!

Finally the ORACLE_INVENTORY directory is required for the - guess what - Oracle inventory which means that Oracle will look here to determine which Oracle software is already on the system etc.
The really good thing is that it must not be created now - the installer will do that for you!

Putting all together will lead to the following example:

bc1-js21-1-lpar2:~ # mkdir -p /opt/oracle/app/oracle
bc1-js21-1-lpar2:~ # mkdir -p /opt/oracle/app/oracle/product/10.2.0.1/rdbms
bc1-js21-1-lpar2:~ # chown -R oracle:oinstall /opt/oracle/app/oracle
bc1-js21-1-lpar2:~ # chmod -R 775 /opt/oracle/app/oracle

Don't forget to set the permissions as shown above - if you do, the installation will not be successfull.

Please note...

You can of course set the ORACLE_HOME variable in the user's environment like:
# Oracle's .bashrc
...skipping some lines...
ORACLE_HOME=/opt/oracle/app/oracle/product/10.2.0.1/rdbms
PATH=$PATH:$ORACLE_HOME/bin

Storage Options

Like for any other database Oracle requires some kind of disk storage to hold the data of the database. In general there are several possibilities to do that:

  • Filesystem
  • Raw Devices
  • Automatic Storage Management (ASM)

Using a file system to satisfy the storage requirements of an Oracle database has the advantage that everything you need comes with your Linux distribution. But it offers the weakest performance because Oracle doesn't want to use the write-cache a filesystem offers. Unfortunately the write are always written to the filesystem cache - which adds an additional overhead - unless you are using a special filesystem which bypass additional overhead (e.g. OCFS). In addition I see a potential performance issue for ext2/3 filesystems using 4k max. block size - let's assume Oracle uses 8k block size this would lead to two I/O operations on an ext2/3 file system for one Oracle I/O. Finally the administrative overhead seems to be larger than on the other solutions.

The second choice is to use raw devices which will give you the best performance because each I/O goes directly to the disk without any filesystem or volume manager in between. Oracle itself can handle raw devices since it was introduced I guess. But nevertheless it is quite complex to setup and more than that to maintain. You'll have to bind each valid block device, or let's say disk partition you want to use to a raw device. And this binding is setup in the rawdevices configuration file - either /etc/raw for SLES9 or /etc/sysconfig/rawdevices for RHEL4. The syntax is very easy but differs depending which distribution you are using. It just says; bind /dev/raw/raw[n] to /dev/sd[n] like /dev/raw/raw1 to /dev/sda1. After you've created the configuration file, start the raw services with /etc/init.d/rawdevices - for RHEL4 - or /etc/init.d/raw - for SLES9 - and don't forget to use chkconfig to start the service on each reboot. After you've setup the rawdevices you use them with Oracle - either using the device name like /dev/raw/raw1 directly for the datafile or by using symbolic links to the corresponding raw device.

The final method of storage management for Oracle 10g is via the Automatic Storage Management (ASM) feature, which ist new in Oracle 10g. ASM gives you a set of tools which eases the storage management dramatically. In addition to that it keeps devices persistent by putting a label on them. How it works is very easy - you specify a set of disks which are assigned to a disk group which is managed by ASM. You don't have to think about how to distribute your datafiles etc. It provides additional redundant storage - if you like to and can hold the flash recovery area. In general you'll have two choices of using ASM:
The first is to download and install the ASM library driver and utilities from here. After you've downloaded and installed them you configure oracleasm as root by invoking the /etc/init.d/oracleasm script with the option configure.

[root@op710-1-lpar1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration:           [  OK  ]
Loading module "oracleasm":                                [  OK  ]
Mounting ASMlib driver filesystem:                         [  OK  ]
Scanning system for ASM disks:                             [  OK  ]

Afterwards you can add devices as ASM drives with the option createdisk.

[root@op710-1-lpar1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk:                   [  OK  ]

Finally oracleasm offers some listing and querying options

[root@op710-1-lpar1 ~]# /etc/init.d/oracleasm listdisks
VOL1
[root@op710-1-lpar1 ~]# /etc/init.d/oracleasm querydisk VOL1
Disk "VOL1" is a valid ASM disk on device [8, 49]

And finally you can remove the disks if you'll like to.

[root@op710-1-lpar1 ~]# /etc/init.d/oracleasm deletedisk VOL1
Removing ASM disk "VOL1":                                  [  OK  ]

The second way of using ASM without the ASM library driver and utilities is to bind the devices to raw devices as mentioned earlier and to create an ASM instance during the installation. The disadvantage of this is that you will have to fix the device permissions for the raw devices by yourself by editing /etc/udev/permissions.d/50-udev.permissions on RHEL4 or /etc/udev/udev.permissions on SLES9. Change the owner and group for raw disks from root:disk to oracle:oinstall (after the installation change them to oracle:dba. Otherwise you must set the device permissions after each and every reboot manually! In addition keep in mind that you can install the ASM instance in the same ORACLE_HOME directory as the database but it is recommended that you'll create an own ORACLE_HOME for ASM - this will seperate the database from the ASM instance and makes them nearly independent from each other - e.g. if you'll have to upgrade the database you don't necessarily need to update ASM, too.

I will show an installation of Oracle using ASM library and tools.

One final word about ASM...at least there is one more option you'll have to consider: Do you want to install ASM and the database into one ORACLE_HOME directory or do you want to use seperate ORACLE_HOMEs - one for ASM and one for the database?
Oracle recommends to use separate ORACLE_HOME directories because then your ASM installation will be more or less independent from your database. This will give you greater flexibility in the situation you want/have to upgrade the database but don't want or need to upgrade ASM, too. If you've installed both into one ORACLE_HOME directory you must upgrade ASM and the database. If you've installed them into separate ORACLE_HOMEs you can normally keep your ASM installation (i.e. don't need to touch it) and only upgrade the database.
Both ways are possible but I prefer to use separate ORACLE_HOMEs. The only disadvantage is that you'll have one more installation step to do - first install ASM, then the database. And you'll have to consider that after a reboot of the system, the ASM instance must be up and running before you can actually start the database.

Preinstallation recap

As you've seen or already know, there are a lot of things to consider and to configure before you can actually start the installation of an Oracle database. If you're installing only one database system - let's say - per month this isn't a real problem. But if you'll have to install more than one at a time this could get annoying. Because I am a little bit lazy I've included most of those preinstallation tasks in my installation scripts (AutoYast, Kickstart). This is a very comfortable way of setting up a system for Oracle and it avoids that I forget something important. Here's the part of my installation script related to Oracle. Please note that it is for a Red Hat Enterprise Linux 4 (RHEL4) system - that's why I have this rpm-orgy at the beginning of the script because RHEL4 is a little bit weird about ppc and ppc64 rpms.

#Turn on network
service network start
mount 9.154.2.86:/export/rhel4/u4/RedHat/RPMS /mnt
RPM_LIST="compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33"
for SLOT in $RPM_LIST
do
        TEST=`rpm -qa | grep $slot`
        if [ "$TEST" != "" ]
        then
                PACKAGE=`echo $TEST | cut -d' ' -f1`
                rpm -ev --allmatches --nodeps $PACKAGE
        fi
done
rpm -ivh --nodeps /mnt/compat-libgcc-296-2.96-132.7.2.ppc.rpm
rpm -ivh --nodeps /mnt/compat-libstdc++-296-2.96-132.7.2.ppc.rpm
rpm -ivh --nodeps /mnt/compat-libstdc++-33-3.2.3-47.3.ppc.rpm
rpm -ivh --nodeps /mnt/libgcc-3.4.6-3.ppc64.rpm
rpm -ivh --nodeps /mnt/compat-libstdc++-33-3.2.3-47.3.ppc64.rpm
rpm -ivh --nodeps /mnt/glibc-devel-2.3.4-2.25.ppc64.rpm
rpm -ivh --nodeps /mnt/libaio-0.3.105-2.ppc64.rpm
rpm -ivh --nodeps /mnt/xorg-x11-deprecated-libs-6.8.2-1.EL.13.36.ppc64.rpm
umount /mnt
#creating required groups and user
/usr/sbin/groupadd -g 200 oinstall
/usr/sbin/groupadd -g 201 dba
/usr/sbin/groupadd -g 202 oper
# pw is oracle
/usr/sbin/useradd -u 200 -g oinstall -G dba,oper -m -p '$1$stZPv2Dd$7/1Y/VX5TF2r6vSMBR91q1' oracle
# setting network
echo "9.154.2.117       bc1-js21-1-lpar1        bc1-js21-1-lpar1.stuttgart.de.ibm.com" >> /etc/hosts
# setting sysctl values
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
#half the size of physical memory for shmmax
echo "kernel.shmmax = 1073741824" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range" = 1024 65000 >> /etc/sysctl.conf
echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf
echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf
/sbin/sysctl -p
# setting limits.conf
echo "oracle              soft    nproc   2047" >> /etc/security/limits.conf
echo "oracle               hard    nproc   16384" >> /etc/security/limits.conf
echo "oracle               soft    nofile  1024" >> /etc/security/limits.conf
echo "oracle               hard    nofile  65536" >> /etc/security/limits.conf
echo "session    required     /lib/security/pam_limits.so" >> /etc/pam.d/login
# setting /etc/profile
echo "if [ \$USER = \"oracle\" ]; then" >> /etc/profile
echo "        if [ \$SHELL = \"/bin/ksh\" ]; then" >> /etc/profile
echo "              ulimit -p 16384" >> /etc/profile
echo "              ulimit -n 65536" >> /etc/profile
echo "        else" >> /etc/profile
echo "              ulimit -u 16384 -n 65536" >> /etc/profile
echo "        fi" >> /etc/profile
echo "fi"  >> /etc/profile
#setting the directories
mkdir -p /opt/oracle/app/oracle
chown -R oracle:oinstall /opt/oracle/app/oracle
chmod -R 775 /opt/oracle/app/oracle
echo "# oracle settings" >> /home/oracle/.bashrc
echo "JAVA_HOME=/opt/ibm/java2-ppc64-50" >> /home/oracle/.bashrc
echo "TMP=/tmp" >> /home/oracle/.bashrc
echo "TMPDIR=/tmp" >> /home/oracle/.bashrc
echo "ORACLE_BASE=/opt/oracle/app/oracle" >> /home/oracle/.bashrc
echo "ORACLE_HOME=/opt/oracle/app/oracle/product/10.2.0.1" >> /home/oracle/.bashrc
echo "PATH=$PATH:/opt/ibm/java2-ppc64-50/bin:/opt/oracle/app/oracle/product/10.2.0.1/bin:/usr/x11r6/bin" >> /home/oracle/.bashrc
echo "umask 022" >> /home/oracle/.bashrc
echo "export JAVA_HOME TMP TMPDIR ORACLE_BASE ORACLE_HOME PATH" >> /home/oracle/.bashrc
#installing xlc rte
mount 9.154.2.86:/export/xlc/rhel /mnt
rpm -ivh /mnt/xlsmp.msg.rte-1.5.1-1.ppc64pseries.rpm
rpm -ivh /mnt/xlsmp.rte-1.5.1-1.ppc64pseries.rpm
rpm -ivh /mnt/vacpp.rte-7.0.1-1.ppc64pseries.rpm
rpm -ivh /mnt/vac.lib-7.0.1-0.ppc64pseries.rpm
rpm -ivh /mnt/vacpp.rte.lnk-7.0.1-0.ppc64pseries.rpm
umount /mnt
mount 9.154.2.86:/export/oracle /mnt
cd /opt/oracle
cd /root
# Installing ASMLib for kernel 2.6.9-42.0.3
mount 9.154.2.86:/export/other /mnt
rpm -ivh /mnt/asmlib/oracleasm-support-2.0.3-1.ppc64.rpm
rpm -ivh /mnt/asmlib/oracleasm-2.6.9-42.0.3.EL-2.0.3-1.ppc64.rpm
rpm -ivh /mnt/asmlib/oracleasmlib-2.0.2-1.ppc64.rpm
umount /mnt

You should be able to easily adopt this to your own needs.

Furthermore the Oracle Installer gives you the option to create an response file which will automate the installation task of Oracle, too. I will cover that later.

Installation - finally

Ok, now we know everything's in place and we've choosen the storage option for our installation we can finally install Oracle.

First I am checking if my ASM library driver and tools are in place and then I am creating an ASM volume.

[root@bc1-js21-1-lpar1 ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded:                                 [  OK  ]
Checking if /dev/oracleasm is mounted:                     [  OK  ]
[root@bc1-js21-1-lpar1 ~]# /etc/init.d/oracleasm createdisk DATA1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk:                   [  OK  ]
[root@bc1-js21-1-lpar1 ~]# /etc/init.d/oracleasm listdisks
DATA1

Ok - now I run the Oracle Universal Installer as user oracle and first I am configuring the ASM instance.

Next the Oracle Universal Installer (java based) comes up and I select Advanced Installation before I press "Next".

Because I've set ORACLE_BASE the installer is able to determine where the inventory should be located.

Select the "Enterprise Edition" and press "Next".

On the next screen you specify the ORACLE_HOME settings for the database - please remenber that we need two ORACLE_HOME directories, one for ASM and one for the database. Because you configure ASM first, this ORACLE_HOME belongs to ASM.

Now select "Configure ASM" and select a password of your choice and press "Next".

You can change the name of the disk group as desired and set the redundancy. External means that you'll use RAID on an external disk subsystem and you don't want / need Oracle to manage it. Select the disks Oracle detects - if it cannot detect anything then there's something wrong with your disk setup.

Finally you've reached the summary page. Pressing "Install" will do install Oracle on the system.

Now watch the time goes by as Oracle is installing itself on the system.

Linking fails on Red Hat Enterprise Linux 4 U2 or greater..

On Red Hat Enterprise Linux (RHEL) Version 4 Update 2 systems the linking or relinking of Oracle fails. Although this is a known bug since U2 it is still present on RHEL4U3 and U4. There's a patch available from Oracle. Login to Oracle Metalink and search for Patch number 4767801. After you've downloaded the patch to the system, unzip it and wait until you'll see the following error message during the installation.

Now copy the contents to $ORACLE_HOME/lib/stubs and $ORACLE_HOME/lib32/stubs. Here's an example:

[root@bc1-js21-1-lpar1 ~]# unzip 4767801.zip
[root@bc1-js21-1-lpar1 ~]# cp 4767801/stubs64/* $ORACLE_HOME/lib/stubs
[root@bc1-js21-1-lpar1 ~]# cp 4767801/stubs32/* $ORACLE_HOME/lib32/stubs

Finally resume the installation by pressing "RETRY" on the dialog. It should install Oracle without addl. errors.

After the files were successfully installed and linkend on the system, Oracle requires two scripts to be run as root user. So use a new shell, login as root and execute the scripts specified in the window.

Finally Oracle configures itself.

And then it's done! SUCCESS!!

The next step is to create a database. So do the following:
1. Run the installer a second time
2. Select Advanced Installation
3. Keep the Oracle Inventory selection
4. Specify Enterprise Edition
5. Adjust the Home Details - remember to configure a different ORACLE_HOME than for ASM!
6. Select the Type the database
7. Configure the SID and the Global Database Name and the language (character set).
8. Select the Database Management Options as desired
9. Now select ASM as *Database Storage Option

10. Configure the Backup and Recovery Options as desired
11. Select the ASM disks the system already knows
12. Select the passwords for the user accounts
13. And on the Summary press Install to install and create the database

Please note...

If your're installing Oracle on a RHEL4U2 or greater system, be aware that the linking error will occur this time, too. Solve this problem as descriped above.

After the software is copied to the disk and the files were successfully linked the Database Configuration Assistant will start and the database itself will be created.

Wait until the process has finished - the database creation has completed.

And that's it. You now have an Oracle database up and running using ASM on Linux on POWER!

Automating installation

The Oracle Installer has one nice option which let you create a response file to automate the installation process. If you run the installer with the option -record -destinationFile </Path/to/file> it will record your settings and write them in a response file. Here's an example:

[oracle@bc1-js21-1-lpar1 ~]$ ./runInstaller -record -destinationFile /tmp/recorded.rsp

If you've called the installation script like this the installer GUI pops up and you can configure Oracle just like you're used to do. When you reach the Summary screen press CANCEL instead of Install! Now you can look at the response file and change it, if you like and if you can. Moreover you can use it for a silent installation like this:

[oracle@bc1-js21-1-lpar1 ~]$ ./runInstaller -silent -responseFile /tmp/recorded.rsp

Change the file location as apropriate and yes, it works with NFS.

Tip!

I have created an response file which installs the Oracle software only. And I have included the runInstaller -silent ... into my installation scripts. So after 30 minutes I have an new installation of RHEL4 or SLES9 with an working Oracle installation - I just have to setup ASM and then the database which is quite easy!

Please note!

If you'll use the silent installation method be carefull! It works without any problems on SLES9 systems. And unfortunately it works on RHEL4 systems, too! Which means if you're doing a silent installation of Oracle on a RHEL4 system you won't get any error messages! The software is just installed - but not usable at all! So don't use the silent installation method with RHEL4U2 or U3 or U4 on POWER!

Now there's still one thing you must know about the silent installation - it's done in the background. This is not usefull when you're using this method in an installation script! Because the script will finish before the Oracle installation has finished - aargh, that's not nice.
What you could do is to use a little loop - here's the example from a SLES9 install script (not the most elegant one but it works):

...
/usr/bin/sudo -u oracle ./runInstaller -silent -responseFile /mnt/oracle_response.rsp >> /tmp/oracle_install.log 2>&1
test=`ps aux | grep '[o]racle'`
while [ "$test" != "" ]
do
        sleep 20
        test=`ps aux | grep '[o]racle'`
done
/home/oracle/oraInventory/orainstRoot.sh
/opt/oracle/app/oracle/product/10.2.0.1/root.sh -silent
...

If you're looking for a more detailed description - look here.

Links

Find below some links which might be helpfull:


 
    About IBM Privacy Contact