Skip to content
Home » Oracle » How to Install Oracle Database 19c on Solaris

How to Install Oracle Database 19c on Solaris

There're 2 phases of the installation of Oracle database 19c (19.3) as below.

  1. OS Configuration
  2. Installation

Please note that, if you want your database server to have a higher state of 19c directly, say 19.18, you may also consider to patch oracle home before creating the database, it's faster and less risky.

There's a tutorial that directly install Oracle database 19.18 on a new Linux server, you may have a look.

OS Configuration

  1. Check Operating System
  2. Groups, Users and Resources

Check Operating System

OS Version

Oracle Solaris 11.4 will be fine.

root@solaris-11-4:~# uname -a
SunOS solaris-11-4 5.11 11.4.0.15.0 i86pc i386 i86pc

Physical Memory

At least 1 GB memory for single-instance database, 2 GB memory is recommended.

root@solaris-11-4:~# prtconf | grep Mem
Memory size: 8192 Megabytes

Requred Packages

We check required packages to install Oracle database 19c by the following command.

root@solaris-11-4:~# pkg list assembler dtrace header library linker make openmp oracka unzip x11-info-clients xcu4
NAME (PUBLISHER)                                  VERSION                    IFO
compress/unzip                                    6.0.3.23-11.4.0.0.1.14.0   i--
database/mysql-57/library                         5.7.22-11.4.0.0.1.14.0     i--
developer/assembler                               11.4-11.4.0.0.1.4.0        i--
developer/build/make                              11.4-11.4.0.0.1.4.0        i--
diagnostic/ddu/library                            11.4-11.4.0.0.1.15.0       i--
system/dtrace                                     11.4-11.4.0.0.1.15.0       i--
system/header                                     11.4-11.4.0.0.1.15.0       i--
system/kernel/oracka                              11.4-11.4.0.0.1.15.0       i--
system/library                                    11.4-11.4.0.0.1.15.0       i--
system/library/openmp                             11.4-11.4.0.0.1.4.0        i--
system/linker                                     11.4-11.4.0.0.1.15.0       i--
system/xopen/xcu4                                 11.4-11.4.0.0.1.15.0       i--
x11/diagnostic/x11-info-clients                   7.7-11.4.0.0.1.14.0        i--

If there's any package missing from your server, you may consider to install oracle-database-preinstall-19c, a group package to prepare required packages for Oracle database 19c.

Unlimit Login Grace Time

We should make sure that SSH login grace time (LoginGraceTime) has no limit during installation.

root@solaris-11-4:~# grep LoginGraceTime /etc/ssh/sshd_config
LoginGraceTime 0

Domain Name Resolution

root@solaris-11-4:~# cat /etc/hosts
...
192.168.1.153   solaris-11-4

Groups, Users and Resources

Groups

root@solaris-11-4:~# groupadd -g 54321 oinstall
root@solaris-11-4:~# groupadd -g 54322 dba
root@solaris-11-4:~# groupadd -g 54323 oper

Users

Only one user should be created for a single-instance database.

root@solaris-11-4:~# useradd -m -u 54321 -g oinstall -G dba,oper oracle
80 blocks
root@solaris-11-4:~# id -ap oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper) projid=3(default)
root@solaris-11-4:~# passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle

Directories

root@solaris-11-4:~# mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
root@solaris-11-4:~# mkdir -p /u01/app/oraInventory
root@solaris-11-4:~# chown -R oracle:oinstall /u01
root@solaris-11-4:~# chmod -R 775 /u01

Resources

We create a project and set resource limits for user oracle.

root@solaris-11-4:~# projadd -c "Oracle Software Project" user.oracle
root@solaris-11-4:~# grep user.oracle /etc/project
user.oracle:100:Oracle Software Project:::
root@solaris-11-4:~# projmod -sK "project.max-shm-memory=(privileged,4GB,deny)" user.oracle
root@solaris-11-4:~# projmod -sK "project.max-sem-ids=(privileged,256,deny)" user.oracle
root@solaris-11-4:~# projmod -sK "process.max-sem-nsems=(privileged,256,deny)" user.oracle
root@solaris-11-4:~# projmod -sK "project.max-shm-ids=(privileged,256,deny)" user.oracle
root@solaris-11-4:~# id -ap oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper) projid=100(user.oracle)

In this case, we used 4GB as our shared memory limit. Theoretically, you should set 50% of the physical memory, but I would recommend a little higher value, say 62.5%.

Let's check the resource limits.

root@solaris-11-4:~# ulimit -Sa oracle
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited
root@solaris-11-4:~# ulimit -Ha oracle
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited

Verify the project.

root@solaris-11-4:~# projects -l user.oracle
user.oracle
        projid : 100
        comment: "Oracle Software Project"
        users  : (none)
        groups : (none)
        attribs: process.max-sem-nsems=(privileged,256,deny)
                 project.max-sem-ids=(privileged,256,deny)
                 project.max-shm-ids=(privileged,256,deny)
                 project.max-shm-memory=(privileged,4294967296,deny)

We had better reboot the system in case that something dumb happens during installation.

Profile

We turn to configure the profile for oracle.

oracle@solaris-11-4:~$ vi ~/.profile
...
umask 022
alias ll='ls -al'
ORACLE_SID=ORCLCDB
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
TMP=/tmp
TMPDIR=/tmp

export ORACLE_SID ORACLE_BASE ORACLE_HOME TMP TMPDIR PATH

To take it effect immediately, we source the profile.

oracle@solaris-11-4:~$ . ~/.profile
[oracle@solaris-11-4 ~]$

You may have noticed that we also change the format of console prompt for oracle.

To know if the server meets the requirements of Oracle product or not, we may perform a prerequisite check before installation.

Installation

  1. Upload and Unzip Software
  2. Install Oracle Software Only
  3. Create an Oracle Database
  4. Post Installation

Upload and Unzip Software

Upload

➤ sftp [email protected]:/sources/
Connected to 192.168.1.153.
Changing to: /sources/
sftp> put SOLARIS.X64_195000_db_home.zip
Uploading SOLARIS.X64_195000_db_home.zip to /sources/SOLARIS.X64_195000_db_home.zip
SOLARIS.X64_195000_db_home.zip                       99% 2759MB   5.5MB/s   08:19
sftp> quit

Unzip

Directly unzip the image-based installer package into Oracle software home.

[oracle@solaris-11-4 ~]$ unzip -q /sources/SOLARIS.X64_195000_db_home.zip -d $ORACLE_HOME

Install Oracle Software Only

[oracle@solaris-11-4 ~]$ cd $ORACLE_HOME
[oracle@solaris-11-4 dbhome_1]$ ./runInstaller
Launching Oracle Database Setup Wizard...















Create an Oracle Database

[oracle@solaris-11-4 ~]$ dbca





























Post Installation

Listener

We should make sure that the listener is working properly.

[oracle@solaris-11-4 ~]$ lsnrctl status
...
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=solaris-11-4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 19.0.0.0.0 - Production
Start Date                30-DEC-2022 00:36:02
Uptime                    0 days 0 hr. 28 min. 22 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/solaris-11-4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=solaris-11-4)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=solaris-11-4)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "ORCLCDB" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDBXDB" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "f0fb6f8392860b9ae054000c292180dc" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
The command completed successfully

Modify oratab

We need to modify oratab in order to startup and shutdown automatically by scripts. But, where is oratab in Solaris? It's not at the conventional location /etc/oratab. Let's find out.

[oracle@solaris-11-4 ~]$ vi /var/opt/oracle/oratab
...
ORCLCDB:/u01/app/oracle/product/19.0.0/dbhome_1:Y

Restart Test

Here we use dbstart to perform a restart on the database.

[oracle@solaris-11-4 ~]$ dbstart $ORACLE_HOME
Processing Database instance "ORCLCDB": log file /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/log/startup.log

Yes, that's right. dbstart will do a shutdown then startup if the instance is running.

Check Database

SQL> show user
USER is "SYS"
SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
ORCLCDB   READ WRITE

Save PDB's State

In order to automatically open PDB every time we startup the CDB, we should open it and save its state.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        MOUNTED
SQL> alter pluggable database all open;

Pluggable database altered.

SQL> alter pluggable database all save state;

Pluggable database altered.

We save current status for opening all PDB automatically in the future.

Next, let's see how we patch Oracle database 19c on Solaris.

Leave a Reply

Your email address will not be published. Required fields are marked *