Installing Oracle on OpenSolaris

This document describes the installation of Oracle 10.2.01 on OpenSolaris 2009/06.

First, we’ll create the oracle user and groups:

# Create groups
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
# Create users
/usr/sbin/useradd -d /export/home/oracle -g oinstall -G dba -m -s /bin/bash oracle
# Permissions
chmod -R 750 /export/home/oracle
# Set the password
passwd oracle
# Setup the user environment
cat <<EOF >> /export/home/oracle/.profile
umask 022
ulimit -Sn 16384
TMP=/tmp
TMPDIR=\$TMP
export TMP TMPDIR
ORACLE_BASE=/opt/oracle/product/10.2.0
ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
NLS_LANG=AMERICAN_AMERICA.UTF8
ORACLE_SID=orcl

PATH=\$PATH:\$ORACLE_HOME/bin:/usr/bin:/usr/ucb:/etc:/usr/local/bin:.
export ORACLE_BASE ORACLE_HOME ORACLE_SID NLS_DATE_FORMAT NLS_LANG PATH
EOF

Next, we create the oracle directory:

mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/oracle

Install some necessary packages

pkg install SUNWarc SUNWctpls SUNWhea SUNWmfrun SUNWscp SUNWswmt

You will also need the (ancient) dps library for the oracle installer:

cd /usr/X11/lib/
wget http://www.nemeziz.net/files/libdps.so.5
ln -s libdps.so.5 libdps.so
chmod 755 libdps.so*

Set the oracle kernel parameters:

cat <<EOF >> /etc/system
* ORACLE
set noexec_user_stack=1
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=512
set semsys:seminfo_semvmx=65534
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmseg=128
set shmsys:shminfo_shmmni=512
set semsys:seminfo_semopm=256
*************************
EOF

Create the oracle project:

projadd oracle
cat <<EOF >> /etc/user_attr
oracle::::project=oracle
EOF
projmod -s -K "project.max-shm-memory=(priv,6gb,deny)" oracle
projmod -s -K "project.max-sem-ids=(priv,256,deny)" oracle

Now, reboot:

init 6

Login as the oracle user with X11 forwarding (ssh -X) and unzip the installer. You will need to hack the install/oraparm.ini file to make opensolaris a “certified version”

cd database
sed -i s/Solaris=5.10/Solaris=5.11/ install/oraparam.ini

Run the installer:

./runInstaller

The installer will complain about the solaris version, but you can safely ignore this.

    • santolanu
    • March 20th, 2010

    Hi,

    Great article.
    But, which arquitecture did you performed that´s installation?
    32-bit or 64-bit?
    I follow your instructions, for 32-bit laptop but it did not work at all. At $ORACLE_HOME/bin, sqlplus has 0 bytes size. Really strange. It looked like compilations problems.
    Had you find out workaround this problems?

    Thanks in advance.
    Carlos Abreu

  1. My installation was on 64 bit:

    oracle@opensolaris:~$ isainfo -kv
    64-bit amd64 kernel modules

    I didn’t have this problem with my installations.
    Check if the zip you downloaded was complete, and that you have enough disk space on your system.

  1. No trackbacks yet.