Tuesday, June 8, 2010

Oracle 10g installation on sun solaries 5.10 (spark) for myself

installation serial
=========================

1. oracle software 10.2.0.1
2. oracle companion
3 oracle patchset for 10.2.0.4


================================================
Checking Requirement:
================================================
#/usr/sbin/prtconf | grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]

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

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


Determine oracle user exist or not
====================================
# id -a oracle


#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle

set password=
=======================
root# passwd -r files oracle

=======================================================
Verify that the owner, group, and mode of the /oracle/oracle/product/10.2.0/bin/oracle file
are correct.
============================================================

# ls -l /oracle/oracle/product/10.2.0/bin/oracle

-rwsr-s--x 1 oracle dba 3195 Apr 27 2005 oracle

-----------------------------------------------------

-------------------------------------------------------

Prevent the Oracle cssd daemon from being started.

Remove the following entry from the /etc/inittab file. This action prevents
unnecessary error messages from being displayed.

h1:23:respawn:/etc/init.d/init.cssd run >/dev/null 2>&| >

------------------------------------------------------------


configuration Start from here .................................
.................................................................


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

root# unzip 10202_database_solx86.zip

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


==================================
/etc/hosts
==================================
root@BADB2 #
root@BADB2 # cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.11.2.254 BADB8
root@BADB2 #

[note:
]
==================================system==============================
root@BADB2 # cat /etc/system
-------
------
[note: For EMC they can do it ]


set md:mirrored_root_flag=1
*** Begin EMCpower added lines *** DO NOT EDIT BELOW THIS LINE ***
forceload: drv/emcpsf
forceload: drv/sd
forceload: drv/ssd
forceload: drv/emcp
forceload: misc/emcpmpx
forceload: misc/emcpsapi
forceload: misc/emcpcg
forceload: misc/emcpgpx
forceload: misc/emcpdm
forceload: misc/emcpioc
set emcp:bPxEnableInit=1
*** End EMCpower added lines *** DO NOT EDIT ABOVE THIS LINE ***
-----------------------
[NOTE: Bellow is for our

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


root@BADB2 #

[note:- 40 GB ]
======================================================================
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


==================================project==============================
root@BADB2 #
root@BADB2 # cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,28991029248,deny)
root@BADB2 #
root@BADB2 # projmod -s -K "project.max-shm-memory=(priv,42949672960,deny)" oracle
root@BADB2 #
root@BADB2 #
root@BADB2 # cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,42949672960,deny)
root@BADB2 #
root@BADB2 #

[ Note: 40 GB Memory RAM in Project]


=========================================================
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

==========================================================================
====================ORACLE_HOME$ CAT .profile=======================================
root@BADB2 #
root@BADB2 #
root@BADB2 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
$
$ bash
bash-3.00$ pwd
/export/home/oracle
bash-3.00$
bash-3.00$ cat .profile
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/d04; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/oracle/ora102; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$HOME/bin:/usr/bin/X11:/usr/bin/X11R6:/usr/local/sbin:/sbin:/bin:/emc/EMCpower/reloc/EMCpower/bin/sparcv9:/etc/emc/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/openwin/bin:.; export PATH
ORACLE_PATH=$ORACLE_HOME/bin:.; export ORACLE_PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
LD_LIBRARY_PATH_64=$ORACLE_HOME/lib; export LD_LIBRARY_PATH_64
CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib; export CLASSPATH
ORACLE_SID=stlbas; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
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
ORAENV_ASK=NO

bash-3.00$

[note :- umask 022
why umask 022 need to know ]

=================================
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


==============================================================
Performing the Oracle Installation
==============================================================

root# su – oracle
oracle$ xclock
oracle$ xhost +
oracle$ export DISPLAY=localhost;0.0
oracle$ xhost + >>run this if you install from remote PC
oracle$ cd /export/home/database/ [the source unzipped here]

oracle$ ./runInstaller

it prerequist check problem happen then

oracle$ ./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'S 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


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

root# vi /etc/init.d/dbstop


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


echo
echo " HAVE A NICE DAY"
echo


su - oracle<
lsnrctl stop

sqlplus /nolog<connect / as sysdba
shutdown immediate

EOS

echo
echo " Bank's database stoped..."
echo

#emctl stop dbconsole
#isqlplusctl stop

EOO

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


===================
Some UNIX Commands:
===================

root# ps -ef

root# ls -al

root# rm

root# rm -R

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# prtconf|grep -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]




If you do not know the correct port number to use, look for
the following line in the
===========================================================

$ORACLE_HOME/install/portlist.ini file.


patchset for 10.2.0.4 on solaries (oracle software 10.2.0.1 is abailable for solaries
======================================================================================


p3731593_10204_SOLARIS64.zip is the patchset 10.2.0.4 for Enterprise Manager Grid Control,
correct patchset is:

6810189
Skip Headers
Oracle® Database Patch Set Notes
10g Release 2 (10.2.0.4) Patch Set 3 for Solaris Operating System (SPARC 64-Bit)

BEFORE installing a patchset it's always a good idea to read the README file.

Werner

-------------------------------------------------

Shutdown
====================
You have more than one command option that you can use. The best command is this, executed as root:

shutdown -y -i5 -g0

This will immediately shut the system down. You can also use the older command that still works:

sync;sync;init 5

You can even use:

poweroff

Reboot
==================================
If you are trying to reboot the system as opposed to turning it off, you could use:

shutdown -y -i6 -g0

Or:

sync;sync;init 6

Or even:

reboot

So many commands to do the same thing… almost seems silly.




No comments: