This post describes how to install Oracle 19C on Oracle Enterprise Linux 7 (OEL7) in silent mode.
Download the Software for 19C is available on OTN or e delivery
Database software
LINUX.X64_193000_db_home.zip
OS configuration and preparation
OS configuration is executed as root. To login as root just execute following command in terminal.
su - root
The “/etc/hosts” file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
192.168.225.1 analytics-db1 analytics-db1.biks.com
Set hostname
hostnamectl set-hostname analytics-db1 --static
It’s highly recommended to update OS with latest packages
yum update
Extra configuration steps:
- add new OS groups
- add new OS user
- install required OS packages
- set specific kernel parameters
- disable transparent hugepages and defrag
Above steps can be done automatic or manually
Automatic
Execute following command
yum install -y oracle-database-preinstall-19c
Details about steps executed by above statement can be found in file
/var/log/oracle-database-preinstall-19c/backup/<DATE>/orakernel.log
Manual
Manual installation can give you more control on installation
Add groups
#basic groups for database management
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#extra dedicated groups can be ignored for simple installations
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba
#Add user Oracle for database software
useradd -u 54321 -g oinstall \
-G dba,oper,backupdba,dgdba,kmdba,racdba oracle
Change password for user Oracle
passwd oracle
Install required packages
#basic packages to install
yum install -y bc
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libdtrace-ctf-devel
yum install -y libXrender
yum install -y libXrender-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libxcb
yum install -y make
yum install -y smartmontools
yum install -y sysstat
#following 4 not available in oel7
#yum install -y dtrace-modules
#yum install -y dtrace-modules-headers
#yum install -y dtrace-modules-provider-headers
#yum install -y dtrace-utils
#(for Oracle RAC and Oracle Clusterware)
yum install -y net-tools
#(for Oracle ACFS)
yum install -y nfs-utils
#(for Oracle ACFS Remote)
yum install -y python
yum install -y python-configshell
yum install -y python-rtslib
yum install -y python-six
yum install -y targetcli
Add kernel parameters to /etc/sysctl.conf
# kernel parameters for 19C installation
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
net.ipv4.ip_local_port_range = 9000 65500
Apply kernel parameters
/sbin/sysctl -p
Add following lines to set shell limits for user oracle in file /etc/security/limits.conf
# shell limits for users oracle 19C
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 134217728
oracle hard memlock 134217728
This step is recommended by Oracle to avoid later performance problems – Doc ID 1557478.1. It can be done by adding transparent_hugepage=never to /etc/default/grub
[root@analytics-db1 ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=”$(sed ‘s, release .*$,,g’ /etc/system-release)”
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=”console”
GRUB_CMDLINE_LINUX=”crashkernel=auto rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet numa=off transparent_hugepage=never“
GRUB_DISABLE_RECOVERY=”true”
After applying and rebooting host can be checked with following command
[root@analytics-db1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
Next steps
Create directory structure for binaries as user root
- ORACLE_BASE – /u01/db/app/oracle
- ORACLE_HOME – /u01/db/app/oracle/product/19.3.0.0/db_1
mkdir -p /u01/db/app/oracle/product/19.3.0.0/db_1
chown oracle:oinstall -R /u01
Disable firewall
systemctl stop firewalld
systemctl disable firewalld
Add following lines in /home/oracle/.bash_profile
for user oracle
# Oracle Settings
export TMP=/tmp
export ORACLE_HOSTNAME=analytics-db1
export ORACLE_UNQNAME=ORA19C
export ORACLE_BASE=/u01/db/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0.0/db_1
export ORACLE_SID=ORA19C
PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'
umask 022
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
envo
Install database software
Connect as user oracle
[root@analytics-db1 ~]# su – oracle
Let’s start with database software installation as oracle user. Copy zip to ORACLE_HOME directory and then unzip it. It’s ready binaries !
[oracle@analytics-db1 ~]$cp LINUX.X64_193000_db_home.zip /u01/db/app/oracle/product/19.3.0.0/db_1
cd /u01/db/app/oracle/product/19.3.0.0/db_1
unzip LINUX.X64_193000_db_home.zip
after unzip you should see following
[oracle@analytics-db1 db_1]$ pwd
/u01/db/app/oracle/product/19.3.0.0/db_1
[oracle@analytics-db1 db_1]$ ls
addnode dbs instantclient network owm root.sh.old.1 ucp
apex deinstall inventory nls perl runInstaller usm
assistants demo javavm odbc plsql schagent.conf utl
bin diagnostics jdbc olap precomp sdk wwg
clone dmu jdk OPatch QOpatch slax xdk
crs drdaas jlib opmn R sqldeveloper
css dv ldap oracore racg sqlj
ctx env.ora lib ord rdbms sqlpatch
cv has LINUX.X64_193000_db_home.zip ords relnotes sqlplus
data hs md oss root.sh srvm
dbjava install mgw oui root.sh.old suptools
check environment settings
–I defined 4 aliases in .bash_profile of user oracle to make
–administration easier 🙂
[oracle@analytics-db1 ~]$ alias envo tns cdoh cdob
alias envo=’env | grep ORACLE’
alias tns=’cd $ORACLE_HOME/network/admin’
alias cdoh=’cd $ORACLE_HOME’
alias cdob=’cd $ORACLE_BASE’
–run alias command envo to display environment settings
[oracle@analytics-db1 ~]$ envo
ORACLE_UNQNAME=ORA19C
ORACLE_SID=ORA19C
ORACLE_BASE=/u01/db/app/oracle
ORACLE_HOSTNAME=analytics-db1
ORACLE_HOME=/u01/db/app/oracle/product/19.3.0.0/db_1
–run alias command cdob and cdoh
–to check ORACLE_BASE, ORACLE_HOME
[oracle@analytics-db1 ~]$ cdob
[oracle@analytics-db1 oracle]$ pwd
/u01/db/app/oracle
[oracle@analytics-db1 ~]$ cdoh
[oracle@analytics-db1 db_1]$ pwd
/u01/db/app/oracle/product/19.3.0.0/db_1
Response files
Once Oracle 19C binaries are unzipped. In following directories you can find response files that stores parameters necessary to install Oracle components:
directory | response file | |
$ORACLE_HOME/install/response | db_install.rsp | |
$ORACLE_HOME/assistants/dbca | dbca.rsp | |
$ORACLE_HOME/assistants/netca | netca.rsp |
- db_install.rsp – used to install oracle binaries, install/upgrade a database in silent mode
- dbca.rsp – used to install/configure/delete a database in silent mode
- netca.rsp – used to configure simple network for oracle database in silent mode
All response files are attached/mentioned in the page link: https://blog.biks.in/db/response-files-for-db-19c-silent-installation/(opens in a new tab)
[oracle@analytics-db1 response]$ cd $ORACLE_HOME/install/response
[oracle@analytics-db1 response]$ pwd
/u01/db/app/oracle/product/19.3.0.0/db_1/install/response
[oracle@analytics-db1 response]$ ls *.rsp
db_install.rsp
[oracle@analytics-db1 dbca]$ cd $ORACLE_HOME/assistants/dbca
[oracle@analytics-db1 dbca]$ pwd
/u01/db/app/oracle/product/19.3.0.0/db_1/assistants/dbca
[oracle@analytics-db1 dbca]$ ls *.rsp
dbca.rsp
cd $ORACLE_HOME/assistants/netca
[oracle@analytics-db1 netca]$ pwd
/ora01/app/oracle/product/19.3.0.0/db_1/assistants/netca
[oracle@analytics-db1 netca]$ ls *.rsp
netca.rsp
Install Oracle binaries
It’s the best to preserve original response file db_install.rsp before editing it
[oracle@analytics-db1 response]$ cp db_install.rsp db_install.rsp.bck
Edit file db_install.rsp to set parameters required to install binaries. This is just example and in next releases parameters can be different. Each of presented parameter is very well described in db_install.rsp. Below is a mere brief explanations.
——————————————–
— force to install only database software
——————————————–
oracle.install.option=INSTALL_DB_SWONLY
——————————————–
— set unix group for oracle inventory
——————————————–
UNIX_GROUP_NAME=oinstall
——————————————–
— set directory for oracle inventory
——————————————–
INVENTORY_LOCATION=/u01/db/app/oraInventory
——————————————–
— set oracle home for binaries
——————————————–
ORACLE_HOME=/u01/db/app/oracle/product/19.3.0.0/db_1
——————————————–
— set oracle home for binaries
——————————————–
ORACLE_BASE=/u01/db/app/oracle
——————————————–
— set version of binaries to install
— EE – enterprise edition
——————————————–
oracle.install.db.InstallEdition=EE
——————————————–
— specify extra groups for database management
——————————————–
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
once edition is completed. Start binaries installation.
cd /u01/db/app/oracle/product/19.3.0.0/db_1
./runInstaller -silent \
-responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/install/response/db_install.rsp
If you run into error like below
[WARNING] [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck'
Solution 1
Set the OS parameter in your terminal to a previous version and re-start the Oracle Universal Installer.
export CV_ASSUME_DISTID=OEL7.8
Solution 2
Edit the file cvu_config which is located in $ORACLE_HOME/cv/admin, change the line from
# Fallback to this distribution id #CV_ASSUME_DISTID=OEL5
to
# Fallback to this distribution id CV_ASSUME_DISTID=OEL7.8
Save the file and re-start the Installer.
output is following
[oracle@analytics-db1 db_1]$ ./runInstaller -silent \ -responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/install/response/db_install.rsp
Launching Oracle Database Setup Wizard…
The response file for this session can be found at:
/u01/db/app/oracle/product/19.3.0.0/db_1/install/response/db_2019-06-07_11-13-06AM.rsp
You can find the log of this install session at:
/tmp/InstallActions2019-06-07_11-13-06AM/installActions2019-06-07_11-13-06AM.log
As a root user, execute the following script(s):
1. /u01/db/app/oraInventory/orainstRoot.sh
2. /u01/db/app/oracle/product/19.3.0.0/db_1/root.sh
Execute /u01/db/app/oraInventory/orainstRoot.sh on the following nodes: [analytics-db1]
Execute /u01/db/app/oracle/product/19.3.0.0/db_1/root.sh on the following nodes:
[analytics-db1]
Successfully Setup Software.
Moved the install session logs to:
/u01/db/app/oraInventory/logs/InstallActions2019-06-07_11-13-06AM
you are asked to run two scripts as user root. Once it’s done binaries are installed. I’m not sure if it’s necessary from previous logs it looks it’s already done
[root@analytics-db1 /]#
/u01/db/app/oraInventory/orainstRoot.sh
/u01/db/app/oracle/product/19.3.0.0/db_1/root.sh
quick binary verification
[oracle@analytics-db1 db_1]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 – Production on Fri Jun 7 11:17:42 2019
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
Configure Oracle Net
Again based on response file Oracle Net will be configured
cd /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/netca
cp netca.rsp netca.rsp.bck
You can edit netca.rsp to set own parameters. I didn’t changed anything here. So just start standard configuration. It will configure LISTENER with standard settings.
netca -silent -responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/netca/netca.rsp
Below is the output
netca -silent -responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/netca/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/db/app/oracle/product/19.3.0.0/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
Check LISTENER status
[oracle@analytics-db1 db_1]$ lsnrctl status
Output:
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 07-JUN-2019 11:32:53
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel7.dbaora.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 07-JUN-2019 11:28:40
Uptime 0 days 0 hr. 4 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/db/app/oracle/product/19.3.0.0/db_1/network/admin/listener.ora
Listener Log File /u01/db/app/oracle/diag/tnslsnr/oel7/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel7)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
Configure database
The last setup is to create new container database ORA19C.dbaora.com with one pluggable database PORA1891 and configure and enable oracle db express
Prepare directories for database datafiles and flash recovery area
mkdir /u01/db/app/oracle/oradata
mkdir /u01/db/app/oracle/flash_recovery_area
backup original response file for dbca
cd /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/dbca
cp dbca.rsp dbca.rsp.bck
vi dbca.rsp
set own parameters
--------------------------------------------
-- global database name
--------------------------------------------
gdbName=ORA19C
--------------------------------------------
-- instance database name
--------------------------------------------
sid=ORA19C
--------------------------------------------
--create container database
--------------------------------------------
createAsContainerDatabase=true
--------------------------------------------
-- number of pluggable databases
--------------------------------------------
numberOfPDBs=1
--------------------------------------------
-- list of pluggable databases
--------------------------------------------
pdbName=PORA19C1
--------------------------------------------
-- Flag to create local undo tablespace for all PDB's.
--------------------------------------------
useLocalUndoForPDBs=true
--------------------------------------------
-- pluggable administrator password
--------------------------------------------
pdbAdminPassword=Oracle19c#
--------------------------------------------
-- template name used to create database
--------------------------------------------
templateName=General_Purpose.dbc
--------------------------------------------
-- password for user sys
--------------------------------------------
sysPassword=Oracle19c#
--------------------------------------------
-- password for user system
--------------------------------------------
systemPassword=Oracle19c#
--------------------------------------------
-- configure dbexpress with port 5500
--------------------------------------------
emConfiguration=DBEXPRESS
emExpressPort=5510
--------------------------------------------
-- password for dbsnmp user
--------------------------------------------
dbsnmpPassword=Oracle19c#
--------------------------------------------
-- default directory for oracle database datafiles
--------------------------------------------
datafileDestination=/u01/db/app/oracle/oradata
--------------------------------------------
-- default directory for flashback data
--------------------------------------------
recoveryAreaDestination=/u01/db/app/oracle/flash_recovery_area
--------------------------------------------
-- storage used for database installation
-- FS - OS filesystem
--------------------------------------------
storageType=FS
--------------------------------------------
-- database character set
--------------------------------------------
characterSet=AL32UTF8
--------------------------------------------
-- national database character set
--------------------------------------------
nationalCharacterSet=AL16UTF16
--------------------------------------------
-- listener name to register database to
--------------------------------------------
listeners=LISTENER
--------------------------------------------
-- force to install sample schemas on the database
--------------------------------------------
sampleSchema=true
--------------------------------------------
--specify database type
--has influence on some instance parameters
--------------------------------------------
databaseType=OLTP
--------------------------------------------
-- defines size of memory used by the database
--------------------------------------------
totalMemory=4096
run database installation
dbca -silent -createDatabase \
-responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/dbca/dbca.rsp
Example output
[oracle@analytics-db1 dbca]$ dbca -silent -createDatabase \
> -responseFile /u01/db/app/oracle/product/19.3.0.0/db_1/assistants/dbca/dbca.rsp
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/db/app/oracle/cfgtoollogs/dbca/ORA19C.
Database Information:
Global Database Name:ORA19C.dbaora.com
System Identifier(SID):ORA19C
Look at the log file "/u01/db/app/oracle/cfgtoollogs/dbca/ORA19C/ORA19C.log" for further details.
Verify connection
[oracle@analytics-db1 dbca]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 – Production on Sat Jun 8 02:35:22 2019
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.3.0.0.0
SQL> show parameter db_name
NAME TYPE VALUE
————— ———– ——————————
db_name string ORA19C
SQL> alter session set container=PORA19C1;
Session altered.
SQL> show con_id
CON_ID
——————————
3
SQL> show con_name
CON_NAME
——————————
PORA19C1
SQL>
Check port status of db express in root database
SQL> ALTER SESSION SET CONTAINER=cdb$root;
Session altered.
SQL> select DBMS_XDB_CONFIG.GETHTTPSPORT from dual;
GETHTTPSPORT
————
5510
SQL>