Sunday, January 30, 2011

Installing Oracle 10g in Sun Solaris 10 X86

Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
--------------------------------------------------------------------------------

Installing Oracle 10g in Sun Solaris 10 X86
-------------------------------------------

1. Check the Ram Size.

#/usr/sbin/prtconf | grep “Memory size”

2. Check Swap size.

# /usr/sbin/swap -s

3. Check the /tmp size > 400 mb

# df -k /tmp

4. Check the Solaris Version.

# uname -r

5. Necessary Packages check.

SUNWbtool
SUNWarc
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWsprox
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt


if any of the packages is missing then install those missing packages as below

1) First put CDROM/DVD into drive

2) For CDROM: After few second change directory /cdrom/cdrom0 or /cdrom/VOL_NAME

# cd /cdrom/cdrom0

3) For DVDROM: After few second change directory /dvd/VOL_NAMRE

If this does not works make sure volmgt daemon is running:

# /etc/init.d/volmgt start

Scan for devices both cd or floopy using:

#volcheck

Then proceed with cdrom device

Eg:-

# pkgadd -d /cdrom/sol_10_106_x86/Solaris_10/Product SUNWi1cs SUNWi15cs



# cat /etc/nsswitch.conf | grep hosts
# hostname

6. Set the Kernel Parameters.

Set the below parameters in /etc/system file.

set shmsys:shminfo_shmmax=4294967295
set semsys:seminfo_semmsl=256
set semsys:seminfo_semmni=100
set shmsys:shminfo_shmmni=100

Add new project named as oracle

# projadd oracle

Append the below in /etc/user_attr file

oracle::::project=oracle

alter the kernel parameter "max-shm-memory" to set the maximum size of semaphores.

# prctl -n project.max-shm-memory -i project oracle

It will result output as below.

project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 254MB - deny -
system 16.0EB max deny -

That the curren value for this projet is set as 254MB, change this to desired value. eg 4gb

Execute below the make the change dynamically.
# prctl -n project.max-shm-memory -v 4gb -r -i project oracle

Execute the below the make the change even after reboot, this
will modify the /etc/project file as per the below output.

# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)

Now check whether the change has taken place.

# prctl -n project.max-shm-memory -i project oracle


Create User groups and users.

# groupadd oinstall
# groupadd dba
# useradd -d /home/oracle -g oinstall -G dba -s /bin/ksh oracle
# passwd -r files oracle
# mkdir /home/oracle

/**************************************************************************/
Automountd keeps track on /home by default. If you want to manually controll
this dir, then you need to disable automountd or comment out any line in
/etc/auto_home and /etc/auto_master. After comment out everything you can
reboot the system to be sure that automountd has no control over /home.
/**************************************************************************/

# chmown oracle:dba /home/oracle
# mkdir -p /u01/app/oracle/product/10.2.0/db_1
# mkdir -p /u01/app/oracle/oradata
# chown -R oracle:dba /u01

Set the Oracle user environment varibales.

# su - oracle

$ vi .profile

export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=firstdb
export PATH=$ORACLE_HOME/bin:/usr/openwin/bin:/usr/x11R6/bin:$PATH


Install Oracle software as oracle user.

GUI Mode - Remote Installation.

We can use cygwin tool for X11 forwading the GUI mode to the
windows desktop. cygwin/X can be downloaded for free.

Can also use (Moba Xterm) / or any other Xterm software.

For X11 forwarding we need to select the below packages
while downloading/installing the cygwin

xorg-server
xinit
xorg-docs
x-start-menu-icons
inetutils
openssh

Step 1:

Once the cygwin tool is installed, open the cygwin
tool.

start the xwin by executing

$ startxwin

The above command will open an x terminal window.
In that enter the Server which we are going to forward to
the windows desktop.

$ xhost + 192.168.1.5

Now open the putty session.


in right hand side select the SSH and check the
enable x11 forwarding box

Enter the host details and login to the box.
now set the DISPLAY variable where the GUI mode sessions
to be forwarded.

$ export DISPLAY=192.168.1.2:0.0

$ cd /software/database
$ ./runInstaller


if installing in local host in gui mode then set the
$export DISPLAY=:0.0
-----------------------------------------------------------------

Silent Mode Installation - Remote Installation.


login as oracle user

$ su - oracle

unzip the oracle 10g database file.

$ cd /software
$ unzip 10202_database_solx86.zip

Once the unzip completed we a see a directory called database inside the
same directory, and inside database you can see a direcotry called
response.

$ cd /software/database/response

Here we can find all the response file, copy the enterprise.rsp to
any location.

$ cp enterprise.rsp /home/oracle

$ vi /home/oracle/enterprise.rsp

Now modify the response file. We need to enter/ specify values
for the parameters it requres. eg, oracle base path, oracle home,
datbase name, oracle owner group, file system etc.

Read the specification carefully and enter the input.

once the response file is ready we can start the installation as below.


$ cd /software/database

$ ./runInstaller -silent -responseFile /home/oracle/enterprise.rsp


at last run the below scripts as root user.

/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
---------------------------------------------------------------------

Automate database Startup

edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora” and enter the below scripts

#!/bin/ksh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi

case "$1" in
`start`)
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
;;
`stop`)
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac

chmod 777 /etc/init.d/dbora

To integrate dbora file to standart Solaris startup and shutdown process:
————————————————————————
#ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora


edit file “dbstart” & “dbshut”, find line
$ORACLE_HOME_LISTNER=$1

and change to =
$ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1

=============================================================

No comments:

Post a Comment