Installing Oracle Database 18c on Oracle Solaris 11

Installation of Oracle Database 18c on Oracle Solaris 11

Database installation is one of the basic tasks for every DBA in their learning / professional career. You might have had installed Oracle Database (any version) on Oracle / Red Hat Linux. In this post we’ll see installation of Oracle Database 18c on the first ever Cloud OS (Oracle Solaris 11). If you haven’t installed Oracle Solaris 11 yet, learn how to install here.


Before we proceed with the actual installation, we need to check on some pre-requisites. The very important and needed one is, setup of Oracle Database 18c for Oracle Solaris 11. If you don’t have the setup, you may download it from Oracle eDelivery here.

1. OS level configuration. (All actions are supposed to be performed as root user

Check the release of the OS.

root@dbnode2:~$ cat /etc/release
Oracle Solaris 11.3 X86
Copyright (c) 1983, 2015, Oracle and/or its affiliates. All rights reserved.
Assembled 06 October 2015

Make an entry in /etc/hosts file.

Enter server name and assigned IPv4 address in hosts file.

Edit file using vim.

root@dbnode2:~# vi /etc/hosts

Enter full hostsname. (for e.g.)

# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Internet host table
#
127.0.0.1 dbnode2.demunix.com localhost
192.168.0.102 dbnode2.demunix.com dbnode2 loghost

Set Kernel parameters.

root@dbnode2:~# projadd oracle

Append

oracle::::project=oracle

entry in /etc/user_attr file

Edit it using vim or any other text editors.

root@dbnode2:~# vi /etc/user_attr
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
#
# The system provided entries are stored in different files
#
# under "/etc/user_attr.d". They should not be copied to this file.
#
# Only local changes should be stored in this file.
#
root::::type=role
oracle::::project=oracle

Set another kernel parameter by running following command.

root@dbnode2:~# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

Your /etc/project file should look like this.

root@dbnode2:~# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)

Add below entry in /etc/inittab right before ‘startd‘ keyword.

root@dbnode2:~# vi /etc/inittab
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

Your /etc/inittab file should look like this.

root@dbnode2:~# cat /etc/inittab
# Copyright (c) 1988, 2013, Oracle and/or its affiliates. All rights reserved.
#
# The /etc/inittab file controls the configuration of init(1M); for more
# information refer to init(1M) and inittab(4). It is no longer
# necessary to edit inittab(4) directly; administrators should use the
# Solaris Service Management Facility (SMF) to define services instead.
# Refer to smf(5) and the System Administration Guide for more
# information on SMF.
#
# For modifying parameters passed to ttymon, use svccfg(1m) to modify
# the SMF repository. For example:
#
# # svccfg
# svc:> select system/console-login:default
# svc:/system/console-login> setprop ttymon/terminal_type = "xterm"
# svc:/system/console-login> refresh
# svc:/system/console-login> exit
#
dev::sysinit:/usr/sbin/devfsadm -P
ap::sysinit:/usr/sbin/autopush -f /etc/iu.ap
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
smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog

Append below entry in /etc/system file.

root@dbnode2:~# vi /etc/system
set maxusers=4096

And then bounce the server. (Reboot)

root@dbnode2:~# reboot

2. After reboot, add group and assign oracle with those groups.

root@dbnode2:~# groupadd oinstall
root@dbnode2:~# groupadd dba
root@dbnode2:~# groupadd oper

Assign the groups to ‘oracle’ user.

root@dbnode2:~# usermod -g oinstall -G dba -d /export/home/oracle/ oracle
UX: usermod: oracle is currently logged in, some changes may not take effect until next login.

Share ownership of ‘oracle’ user with ‘oinstall’ group.

root@dbnode2:~# chown oracle:oinstall /export/home/oracle
root@dbnode2:~# passwd -r files oracle

Create directories to install Oracle Database 18c

root@dbnode2:~# mkdir -p /u01/app/oracle/product/18.0.0/dbhome_1

Change ownership of /u1 and all child directories.

root@dbnode2:~# chown -R oracle:oinstall /u01

Now switch to oracle user and configure ‘.profile’ file.

root@dbnode2:~# su - oracle
Oracle Corporation SunOS 5.11 11.3 September 2015

Edit .profile file.

oracle@dbnode2:~$ vi .profile

Add following path to oracle’s “.profile” file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

# Select the appropriate ORACLE_BASE
ORACLE_HOSTNAME=dbnode2.demunix.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DEMT; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

3. Unzip Oracle Datbase 18c setup to the directory which we want as our ORACLE_HOME.

Copy the downloaded setup file to oracle home, i.e.

oracle@dbnode2:/u01/app/oracle/product/18.0.0/dbhome_1$ pwd
/u01/app/oracle/product/18.0.0/dbhome_1

List down setup.zip file.

oracle@dbnode2:/u01/app/oracle/product/18.0.0/dbhome_1$ ls
18c.zip

Unzip it.

oracle@dbnode2:/u01/app/oracle/product/18.0.0/dbhome_1$ unzip 18c.zip

Once we’re done with unzipping the setup file, we’re good to start the actual installation.

oracle@dbnode2:/u01/app/oracle/product/18.0.0/dbhome_1$ ./runInstaller

4. Installation Wizard.

Select Set Up Software only and Click on Next.


Select Single Instance Database Installation and Click on Next.


Choose your edition and Click on Next.


Provide location for Oracle Base and Click on Next.


Provide OraInventory location and OraInventory Group name, after the selection Click on Next.


Select privileged OS Groups and Click on Next.


Ignore the warnings in pre-requisites and Click on Next.

Note : If you get any failed result, try to fix it by clicking Fix an Check again button in the wizard.


Verify your selections from summary screen and Click on Install.


Execute configuration scripts as ‘root’ user.

Once you’re done with executing both the scripts, Click on OK.


And it’s done.


Let’s try sqlplus /nolog to verify if Oracle Database software is successfully installed or not.

We have successfully installed Oracle Database 18c on Oracle Solaris 11. In my next post we’ll create a database on this newly installed Oracle Database server on Solaris 11.

Peace 🙂