SOLARIS SETUP (Oracle)


Log in
Log in as root user.

Check hosts-file
The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address>  <fully-qualified-machine-name>  <machine-name>
Usually, this is done already by Solaris installation so there is not much to worry about.
Here is mine:
::1     localhost
127.0.0.1       localhost
192.168.10.1    SolarisORA.testdomain.com      loghost

Set Kernel Parameters
This is something that should not bother you much for now but in order to ORACLE “glide” on your Solaris, you need to setup kernel of the operating system. First, check the release of the Solaris. You need Solaris 10 U6 at least, to run ORACLE 11g R2 database. You probably don’t need this if you download nowadays Solaris but still…
# cat /etc/release
                    Oracle Solaris 10 9/10 s10x_u9wos_14a X86
     Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
                            Assembled 11 August 2010
#
We need to add a new project entry to the /etc/project file, so, as root, issue the following command.
# projadd oracle
In some the the installation guides I saw that they recommend next move to edit /etc/user_attr file but in my case that didn’t work. I got a password inconsistency problem. As a workaround, I’ve delayed this step after creating oracle user.  SO, let’s create it:
# 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
Here you’ll must enter a password for oracle user and pay attention on password requirements.
Create the directories in which the Oracle software will be installed.
# mkdir -p /u01/app/oracle/product/11.2.0.2/db_1
# chown -R oracle:oinstall /u01
In my case, installation is performed on separate hard disk which is mounted on “/u01” partition which is some kind of standard. How to mount hard disk on “/u01”, you can find also on my blog.
If you will just test the database and won’t use any extern hard disk, you can install the software in the "/export/home/oracle" directory as follows.
# mkdir -p /export/home/oracle/u01ln -s /export/home/oracle/u01 /u01mkdir -p /u01/app/oracle/product/11.2.0.2/db_1chown -h oracle:oinstall /u01chown -R oracle:oinstall /export/home/oracle/u01

Now, at last, you must edit and apend "/etc/user_attr" file:
oracle::::project=oracle

Next, we’ll play little bit with a memory. Open new terminal window and login as oracle user. In first terminal window when you still have a root session, issue the following command:

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

You’ll get the output something like:

project: 100: oracle
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged       510MB      -   deny                                 -
        system          16.0EB    max   deny                                 -
#
We need to change max-shm-memory parameter value so issue the following commands as root but keep terminal window with oracle user logged in active
# 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. You can check what those commands did to the /etc/project file:
# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)
#
Next, add the following lines to the “/etc/inittab” file, before the entry for “startd”.
Tm::sysinit:/usr/sbin/ndd –set /dev/tcp tcp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd –set /dev/tcp tcp_largest_anon_port 65500 > /dev/console
tm::sysinit:/usr/sbin/ndd –set /dev/udp udp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd –set /dev/udp udp_largest_anon_port 65500 > /dev/console
Append the following line to the “/etc/system” file.
set maxusers=16384
That’s it, now we need few more steps to complete the system preparation.
Reboot the Solaris.

We need to check for those necessary packages in Solaris. Check to see which of the required 13 packages are already installed.
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot \
  SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl

system      SUNWarc   Lint Libraries (usr)
system      SUNWbtool CCS tools bundled with SunOS
system      SUNWcsl   Core Solaris, (Shared Libs)
system      SUNWhea   SunOS Header Files
system      SUNWi1of  ISO-8859-1 (Latin-1) Optional Fonts
system      SUNWlibC  Sun Workshop Compilers Bundled libC
system      SUNWlibm  Math & Microtasking Library Headers & Lint Files (Usr)
system      SUNWlibms Math & Microtasking Libraries (Usr)
system      SUNWsprot Solaris Bundled tools
system      SUNWtoo   Programming Tools
system      SUNWxwfnt X Window System platform required fonts
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
#
Add the "SUNWi1cs" and "SUNWi15cs" packages using the "pkgadd" command.
# pkgadd -d /cdrom/sol_10_811_x86/Solaris_10/Product SUNWi1cs SUNWi15cs

Processing package instance <SUNWi1cs> from
< /cdrom/sol_10_811_x86/Solaris_10/Product>

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 <SUNWi1cs> [y,n,?] y

Installing X11 ISO8859-1 Codeset Support as <SUNWi1cs>

## Installing part 1 of 1.

Installation of <SUNWi1cs> was successful.

Processing package instance <SUNWi15cs> from </cdrom/sol_10_106_x86/Solaris_10/Product>

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 <SUNWi15cs> [y,n,?] y

Installing X11 ISO8859-15 Codeset Support as <SUNWi15cs>

## Installing part 1 of 1.

Installation of <SUNWi15cs> was successful.
#
Now, say goodbye for now to the root user and create a new session with an oracle user. Edit or create a “/export/home/oracle/.profile“ file and add the following lines:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

# Select the appropriate ORACLE_BASE
ORACLE_HOSTNAME=SolarisORA.testdomain.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=ORASOL; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.2/db_1; export ORACLE_HOME
ORACLE_SID=ORASOL; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

Just in case you are using X emulation then set the DISPLAY environmental variable.
# DISPLAY=<machine-name>:0.0; export DISPLAY

Finally, unzip the files “solaris.x64_11gR2_database_1of2.zip” and “solaris.x64_11gR2_database_2of2.zip”  in the “/u01” directory.
You should now have a single directory called "database" containing installation files in “/u01” partition.

Finally!
Go to “/u01/database directory” and start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
./runInstaller
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: