Friday, April 5, 2013

Install Oracle 10.2.0.4 on Solaris x86

1. Create oracle User Account
Login as root and create te user oracle which belongs to oinstall,dba,asmdba and asmadmin groups.

su -
# groupadd dba
# groupadd oinstall
# groupadd asmdba
# groupadd asmadmin
# useradd -g oinstall -G dba,asmdba,asmadmin -m -d /export/home/oracle -s /usr/bin/bash oracle


2. Setting System parameters
Edit the /etc/system and add following line:

set noexec_user_stack=1

set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=100
set max_nprocs=30000
set maxuprc=16384


Execute following commands to configure system settings for Oracle.
# projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" user.oracle
# projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,128,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,128,deny)" user.oracle

3. Enviroment settings
Edit the /export/home/oracle/.bash_profile file and add following lines: 


umask 022
TMP=/tmp
TMPDIR=$TMP
#DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/opt/oracle/
ORACLE_HOME=$ORACLE_BASE/112
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:/usr/ccs/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

Save the .bash_profile and execute following commands for load new enviroment:
cd /export/home/oracle
. .profile

4. Create base directory for Oracle
Login as root and create base directory for Oracle ($ORACLE_BASE).

su -
# cd /opt
# mkdir oracle
# chown oracle:dba oracle

1. Installation of required packages

Some additional packages are required for succesful instalation of Oracle software. To check whether required packages are installed on your operating system use following command:

pkginfo -i SUNWarc SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8 SUNWpool SUNWpoolr


2. Install the required packages using the pkgadd command:

# pkgadd -d . SUNWarc SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool \
SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8 SUNWpool SUNWpoolr

3. Download the Oracle 10g (11.2.0.1.0) software from Oracle website.
Extract the files using following command:

For Database software installation:

unzip 10.2.0.2.0_database_solx86.zip

cd database
./runInstaller

During the installation, I got the error:

fatal: symbol 'ntcontab' in file $O_H/lib/libn10.a(ntcontab.o): section [3].data: : symbol lies outside of containing section

See metalink: ID 1364167.1

It works!

Next is to upgrade to Oracle 10.2.0.4, you need to download patch 6810189, patch name should be p6810189_10204_Solarisx86.zip.

Perform upgrading: 

Extract patch above
Stop all oracle service
cd Disk1/
./runInstaller.sh

During installation, you might got the above error for ntcontab again, try to do metalink: ID 1364167.1 once again.

I got another error during installation, you just need to skip (continue/ignore) it.

Upgrade should be succeed. The try

1. Stop all Oracle processes
2. Get Oracle patch, extract and install
3. Do as follow to upgrade: 
cd $ORACLE_HOME/rdbms/admin
sqlplus "/as sysdba"
SQL>startup upgrade;
SQL>@catupgrd.sql
SQL>shutdown immediate;
SQL>startup;
SQL>@utlrp.sql

Create init script.
# vi /var/opt/oracle/oratab

SID:ORACLE_HOME:{Y|N|W}

Create a file called dbora, and copy the following lines into this file:

#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
   if [ "$PLATFORM" = "HP-UX" ] ; then
      remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
      exit
   else
      rsh $HOST -l $ORACLE  $0 $1 ORA_DB
      exit
   fi
fi
#
case $1 in
'start')
        if [ "$PLATFORM" = "Linux" ] ; then
          touch /var/lock/subsys/dbora
        fi
        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
        ;;
'stop')
        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
        ;;
*)
        echo "usage: $0 {start|stop}"
        exit
        ;;
esac
#
exit

# chgrp dba dbora
# chmod 750 dbora

# ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora


No comments:

Post a Comment