Monday, September 28, 2009

Install Oracle Database 10g R2 on Solaris [SPARC]

Install Oracle Database 10g R2 on Solaris [SPARC]

Unzip the files:
==========================

root# unzip 10202_database_solx86.zip

(You should now have a single directory called "database" containing installation files.)

================================
Open the "/etc/hosts" file edit:
================================

root# vi /etc/hosts





=================================
Open the "/etc/system" file edit:
=================================

root# vi /etc/system

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=256
set shmsys:shminfo_shmmax= 25769803776
set shmsys:shminfo_shmmni=100

================================
Create the new groups and users:
================================

root# groupadd oinstall
root# groupadd dba
root# useradd -g oinstall -G dba -d /export/home/oracle oracle
root# mkdir /export/home/oracle
root# chown -R oracle:oinstall /export/home/oracle
root# passwd -r files oracle
root# projadd oracle

=======================================================
Append the following line to the "/etc/user_attr" file:
=======================================================

root# vi /etc/user_attr

oracle::::project=oracle


====================================================================
Add the lines to the "/etc/project" file with the following command:
====================================================================

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


=========================================================
To determine whether the required packages are installed:
=========================================================

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

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

===========================================================================
Create oracle home (added by halim)
==========================================================================
Create the directories in which the Oracle software will be installed:

oracle$ mkdir -p /d02/oracle/ora102

chown -R oracle:oinstall /d02


make all neccessary drive/folder for datafiles and give permission (user:- oracle group:- oinstall )
to all oracle datafile folder,oracle installation folder

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

=====================
Edit ".profile" file:
=====================

Oracle$ vi .profile

ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/d02; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/oracle/ora102; export ORACLE_HOME
PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/bin/X11R6:/usr/openwin/bin:$ORACLE_HOME/bin:$HOME/bin:.; export PATH
ORACLE_PATH=$ORACLE_HOME/bin:.; export ORACLE_PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/jlib; export CLASSPATH
ORACLE_SID=stlbas; export ORACLE_SID
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
set TWO_TASK $ORACLE_HOME/bin
TMP=/tmp; export TMP
TEMP=/tmp; export TEMP
TMPDIR=$TMP; export TMPDIR

=================================
Install the oracle software
=================================
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:

DISPLAY=:0.0; export DISPLAY

==========================
oracle$ ./runInstaller


$ ./runInstaller -ignoreSysPrereqs


============================
post installation work
===========================
================================================================
In "/var/opt/oracle/oratab" file modify for auto start Database:
================================================================

root# vi /var/opt/oracle/oratab

stlbas:/d02/oracle/ora102:Y


=========================================================
Create a file "/etc/init.d/dbstart" with following lines:
=========================================================

root# vi /etc/init.d/dbstart


# Start the Oracle Database and listeners
echo
echo "################################################################################"
echo "# Begin of O R A C L E startup section #"
echo "################################################################################"

echo
echo " WELCOME TO BANK DATABASE"
echo


su - oracle<<<<

root# mv [from] [to]

root# cp [from] [to]

root# mkdir

root# rmdir

root# df -k [Display mount point]

root# mount [Display mounted device]

root# umount

root# cat

root# kill -9 PID

root# prtconfgrep -i mem [Display RAM size]

root# ipcs -pmb [Display allocated memory segment]

root# psrinfo -v [Display the no of CPU]

root# sar -u 2 5 [Display CPU report, 1st argument time interval in second, 2nd argument no. of sample]

root# sar -w 5 5 [Memory switching and swaping]

root# sar -b 1 6 [buffer activity]

root# vmstat 5 3 [Various server values, 1st argument time interval in second, 2nd argument no. of sample]

root# mpstat 10 2 [per processor report, 1st argument time interval in second, 2nd argument no. of sample]

root# w [Server load average]

root# iostat 3 [I/O against physical disk in time interval]

===============
NFS Mount (Sun)
===============

The following deamons must be running for the share to be seen by a PC:
-----------------------------------------------------------------------

root# /usr/lib/nfs/nfsd -a
root# /usr/lib/nfs/mountd
root# /opt/SUNWpcnfs/sbin/rpc.pcnfsd


To see a list of the nfs mounted drives already present type:
-------------------------------------------------------------

root# exportfs

First the mount point must be shared so it can be seen by remote machines:
--------------------------------------------------------------------------

root# share F nfs o ro /cdrom

Next the share can be mounted on a remote machine by root using:
----------------------------------------------------------------

root# mkdir /cdrom#1

root# mount o ro myhost:/cdrom /cdrom#1

============
Useful Files
============

/etc/passwd [User settings]
/etc/group [Group settings for users]
/etc/hosts [Hostname lookup information]
/etc/system [Kernel parameters]



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


====user_attr.sh
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# /etc/user_attr
#
# execution attributes for profiles. see user_attr(4)
#
#ident "@(#)user_attr 1.1 07/01/31 SMI"
#
#
adm::::profiles=Log Management
lp::::profiles=Printer Management
postgres::::type=role;profiles=Postgres Administration,All
oracle::::projct=oracle
root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no


======project.sh

system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-sem-ids=(priv,256,deny);project.max-shm-memory=(priv,25769803776,deny)

====hosts.sh
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.11.1.80 sundb loghost

=====system.sh need add following line

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=256
set shmsys:shminfo_shmmax=25769803776
set shmsys:shminfo_shmmni=100

=====dbstart.sh

# Start the Oracle Database and listeners
echo
echo "################################################################################"
echo "# Begin of O R A C L E startup section #"
echo "################################################################################"

echo
echo " WELCOME TO DATABASE"
echo


su - oracle<
lsnrctl start

sqlplus /nolog<connect / as sysdba
startup
EOS

echo
echo " database started..."
echo

#emctl start dbconsole
#isqlplusctl start

EOO

echo
echo "################################################################################"
echo "# End of O R A C L E section #"
echo "################################################################################"
echo


=========================dbstop.sh

# Stop the Oracle Database and linteners
echo
echo "################################################################################"
echo "# Begin of O R A C L E shutdown section #"
echo "################################################################################"


echo
echo " HAVE A NICE DAY"
echo


su - oracle<
lsnrctl stop

sqlplus /nolog<connect / as sysdba
shutdown immediate

EOS

echo
echo " database stoped..."
echo

#emctl stop dbconsole
#isqlplusctl stop

EOO

echo "################################################################################"
echo "# End of O R A C L E section #"
echo "################################################################################"
echo

No comments: