Oracle Database 11g Release 2 Installations on Solaris 11.1 (x86-64)

In this article we’ll describe the installation of Oracle Database 11g Release 2 on Solaris 11.1 (x86-64). The article is based on a default server installation. Alternative installations may require a different setup procedure.


Lab environment:

  • Platform:      VMware vSphere Hypervisor 5.0 (VM)
  • Hostname:   primarylabsrv
  • IP Addr:
  • Memory:      8GB
  • HDD:             100GB (VMware Thin Provision)

Setup Solaris local repository
root@primarylabsrv:~# pkg unset-publisher solaris
root@primarylabsrv:~# pkg set-publisher –g file:///media/SOL_11_1_REPO_FULL/repo solaris

Install Prerequisites
root@primarylabsrv:~# pkg install SUNWhea SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw

Verify Prerequisites
root@primarylabsrv:~# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibms SUNWpool SUNWpoolr SUNWsprot SUNWtoo SUNWlibm SUNWuiu8 SUNWfont-xorg-core SUNWfont-xorg-iso8859-1 SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw SUNWxwplt

system      SUNWarc                  Lint Libraries (usr)
system      SUNWbtool                CCS tools bundled with SunOS
system      SUNWfont-xorg-core       X.Org Foundation X11 core fonts
system      SUNWfont-xorg-iso8859-1  X.Org Foundation X11 iso8859-1 fonts
system      SUNWhea                  SunOS Header Files
system      SUNWlibm                 Math & Microtasking Library Headers & Lint Files (Usr)
system      SUNWlibms                Math & Microtasking Libraries (Usr)
system      SUNWmfrun                Motif RunTime Kit
system      SUNWpool                 Resource Pools
system      SUNWpoolr                Resource Pools (Root)
system      SUNWsprot                Solaris Bundled tools
system      SUNWtoo                  Programming Tools
system      SUNWuiu8                 Iconv modules for UTF-8 Locale
system      SUNWxorg-client-programs X.Org Foundation X Client Programs
system      SUNWxorg-clientlibs      X.Org Foundation X Client Libraries
system      SUNWxwfsw                X Window System platform required font software
system      SUNWxwplt                X Window System platform software

Create new groups, users & Installation directory
Now we need to create few groups, an ‘oracle user’ a non-root account that will own the Oracle database software installation. Become root, issue the following commands:

root@primarylabsrv:~# groupadd oinstall
root@primarylabsrv:~# groupadd dba
root@primarylabsrv:~# groupadd dbgroup

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

root@primarylabsrv:~# mkdir -p /u01
root@primarylabsrv:~# chown -R oracle:oinstall /u01

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

oracle@primarylabsrv:~$ vi /export/home/oracle/.profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

export ORACLE_SID=orcl

export ORACLE_UNQNAME=orcl

export ORACLE_HOSTNAME=primarylabsrv


Configure a Resource Project
You might be familiar with Oracle installations under Linux. If so, you’d know that part of the preparation stage in getting that right is to configure assorted kernel parameters, so that memory and other system resources are adequate. The same thing happens under Solaris, but we do it in a completely different way: we create a “resource project” in which memory and system resources are specified. Later, we assign those resource projects to specific users.

Issue the following command to create resource project and then append following line to the /etc/user_attr file.

root@primarylabsrv:~# projadd oracle
root@primarylabsrv:~# vi /etc/user_attr


Save and exit

If you've performed a default installation, it is likely that the only kernel parameter you need to alter is "max-shm-memory" to meet the minimum installation requirements.

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

root@primarylabsrv:~# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME    PRIVILEGE       VALUE    FLAG  ACTION                       RECIPIENT
        privileged       254MB      -   deny        -
        system          16.0EB    max   deny        -

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

The virtual machine I was using while writing this article created with 8GB memory so I’m actually allocating 50% of the memory to SGA here.  The first command dynamically resets the value, while the second command makes changes into the "/etc/project" file so the value is persistent between reboots.

Verify /etc/project file

root@primarylabsrv:~# more /etc/project

Probably the key resource value to set is that first one: max-shm-memory governs the largest size of shared memory segment that the project can create. You set it to the sum of all the SGAs you think you’re going to create on a box, plus some spare for growth. The usual principle is that, after allowing some memory to the OS for its own use, you allocate 50% of your RAM to SGA and 50% to PGA. The SGA value is then what you’d set your max-shm-memory to.

For example - I have a Server Machine with 64GB memory. I’d maybe allow 32GB RAM for the server OS itself. That means there are 32GB available RAM. Basic principle then says, ‘allow 16GB for SGA and 16GB for PGA’ so set max-shm-memory to 16GB.

Switch user from root to oracle
You must have already installed Xmanager 3.0 under windows workstation machine and Xmanager passive should be running in order to run Oracle database graphical installation. Switch root user to oracle and export Graphical display to your windows Xmanager workstation.


root@primarylabsrv:~# su – oracle
oracle@primarylabsrv:~$ export DISPLAY=
oracle@primarylabsrv:~$ echo $DISPLAY

Run Oracle Database Installer
oracle@primarylabsrv:/download$ unzip -q
oracle@primarylabsrv:/download$ unzip -q

oracle@primarylabsrv:/$ /download/database/runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 180 MB.   Actual 2428 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4974 MB    Passed
Checking monitor: must be configured to display at least 256 colors.  Actual 16777216    Passed

You will see this warning about not meeting minimum system requirements, no worry just ignore and Click Yes to carry on with installation.

Sign up for email alerts and security updates if you have oracle support otherwise leave blank and carry on with the installation.

If you switch off the security updates option and click [Next], you will see the following warning; just click [Yes] to move to next installation screen.


Click [Create and configure a database] then click [NEXT]

Select [Desktop Class] then click [NEXT]

The only thing to do here is to provide a password that will apply to the SYS and SYSTEM users when your starter database is finally created. Click [NEXT]

The path to the Inventory directory is again derived automatically from environment variables and ‘oinstall’ is the correct group to owning the OraInvenrory location.

Click [NEXT]

This screen displaying summary contains information of oracle installation, Click [Finish] and the software installation will begin:
This will take quite some time to complete, meanwhile have a cup of coffee and relax. ;)

The Database Configuration Assistant (DBCA) will be launched automatically:

If everything goes fine then eventually you’ll see the following screen, just click [OK]

Both of these scripts have to be run as root; don’t click [OK] at this stage.

Run each of the scripts mentioned in turn. The first script won’t require any input, but the second script will prompt you for the full pathname of the local bin directory. It will make a default suggestion of /usr/local/bin. This should be changed, by typing the actual path, which is /usr/bin.

labuser@primarylabsrv:~$ su – root
root@primarylabsrv:~# /u01/app/oraInventory/

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

root@primarylabsrv:~# /u01/app/oracle/product/11.2.0/db_1/

Running Oracle 11g script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin
   Copying dbhome to /usr/bin ...
   Copying oraenv to /usr/bin ...
   Copying coraenv to /usr/bin ...

Creating /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Once both scripts have completed, you can return to the earlier dialog box and click [OK] to close it. You’ll get one more dialog box contains the URL information of Enterprise Manager Database Control.

Just click [Close] and the installation is complete.

Post Configuration
There are two post install configuration to be done. First, we need to be able to make the Oracle database come up automatically every time the server is rebooted. To do this, become root and issue the following command:

root@primarylabsrv:~# vi /etc/init.d/dboras

if [ ! -f $ORACLE_HOME/bin/dbstart ]; then
  echo "Oracle Startup: cannot start"

case "$1" in
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
exit 0

Save and exit
Now issue the following commands:
root@primarylabsrv:~# ln -s /etc/init.d/dboras /etc/rc0.d/K01oracle
root@primarylabsrv:~# ln -s /etc/init.d/dboras /etc/rc2.d/K01oracle
root@primarylabsrv:~# ln -s /etc/init.d/dboras /etc/rc2.d/S99oracle
root@primarylabsrv:~# ln -s /etc/init.d/dboras /etc/rc3.d/K01oracle
root@primarylabsrv:~# ln -s /etc/init.d/dboras /etc/rc3.d/S99oracle

That links in the new script to the Solaris Kill and Startup initialization mechanism. 

Finally, issue the following command:
root@primarylabsrv:~# vi /var/opt/oracle/oratab

and replace the very last “:N” to be “:Y”  (that mean “Yes”, I want the database involved to be auto-started).

Save and exit

If you reboot at this point, you should be able to log on as the oracle user and immediately connect to a running database without you having to manual intervene at all.

The final step to do in post-installation is to make sure you can connect to the Enterprise Manager Database Control.

That should be available at the URL your database machine IP Address or Hostname: in my case, as shown in image below.

Like This Article ? :