Saturday, September 12, 2009

Oracle 10g Installation on Solaris10

1. /etc/hosts file must contain a fully qualified name for the server:
(ip-address) (fully-qualified-machine-name) (machine-name)

2. Set Kernel Parameters
In previous versions of Solaris, kernel parameters were amended by adding entries to the "/etc/system" file, followed by a system reboot.

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

3. As the root user, issue the following command.
#projadd oracle

4. Append the following line to the "/etc/user_attr" file.
oracle::::project=oracle

If you've performed a default installation, it is likely that the only kernel parameter you need to alter is "max-shm-memory". To check the current value issue the following command.
# prctl -n project.max-shm-memory -i project oracle

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

To reset this value, make sure at least one session is logged in as the oracle user, then from the root user issue the following commands.

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

The first dynamically resets the value, while the second makes changes to the "/etc/project" file so the value is persistent between reboots.
# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)

5. The Oracle installer seems incapable of recognising kernel parameter set using resource control projects, but if you ignore the warnings the installation completes successfully.
Setup
Add the "SUNWi1cs" and "SUNWi15cs" packages using the "pkgadd" command.

# pkgadd -d /cdrom/sol_10_106_x86/Solaris_10/Product SUNWi1cs SUNWi15cs
(or) copy those directories from CD to local disk.
# pkgadd -d . SUNWi1cs
# pkgadd -d . SUNWi15cs
Processing package instance from

X11 ISO8859-1 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

This appears to be an attempt to install the same architecture and
version of a package which is already installed. This installation
will attempt to overwrite this package.

Using as the package base directory.
## Processing package information.
## Processing system information.
16 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of [y,n,?] y

Installing X11 ISO8859-1 Codeset Support as
## Installing part 1 of 1.
Installation of was successful.
Processing package instance from
X11 ISO8859-15 Codeset Support(i386) 2.0,REV=2004.10.17.15.04
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
This appears to be an attempt to install the same architecture and
version of a package which is already installed. This installation
will attempt to overwrite this package.
Using as the package base directory.
## Processing package information.
## Processing system information.
21 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of [y,n,?] y
Installing X11 ISO8859-15 Codeset Support as
## Installing part 1 of 1.
Installation of was successful.

6. Create the new groups and users:
#groupadd oinstall
#groupadd dba
#groupadd oper
#useradd -g oinstall -G dba -d /export/home/oracle oracle
#mkdir /export/home/oracle
#chown oracle:oinstall /export/home/oracle
#passwd -r files oracle

7. Create the directories in which the Oracle software will be installed:
#mkdir -p /u01/app/oracle/product/10.2.0/db_1
#chown -R oracle:oinstall /u01

8. Login as the oracle user and add the following lines at the end of the .profile file, making sure you have set the correct ORACLE_BASE value:

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
#ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

9. Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:

$DISPLAY=:0.0; export DISPLAY

10. Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory:
$./runInstaller

to check Kernel value: -
#isoinfo -kv
to check RAM size: -
#prtconf | head -3 |grep Mem