Home » , , , , , » Install Oracle Database 18c In Silent Mode

Install Oracle Database 18c In Silent Mode

Written By Srikrishna Murthy Annam on Saturday, September 8, 2018 | 7:31 PM

In this article, let us talk about the silent mode installation of Oracle Database 18c. If you are comfortable with GUI mode installation, please refer my other article Oracle Database 18c Simple Installation. To proceed with the Oracle Database 18c installation, you need to prepare your OS. If your OS is Linux, please refer the article Oracle Database 18c Simple Installation to complete the pre-requisites. If you would like to complete the pre-requisites manually step by step, please refer to the Oracle Document Completing Preinstallation Tasks Manually. For this article, we assume that the pre-installation tasks are completed.

To proceed with the silent mode installation, we need to complete the following  3 steps.

  1. Database 18c Software Installation
  2. Configure the Database Listener
  3. Create database

Following response files supplied by the Oracle Software Image will be modified to update all the required parameter values.

  1. $ORACLE_HOME/install/response/db_install.rsp
  2. $ORACLE_HOME/assistants/netca/netca.rsp
  3. $ORACLE_HOME/assistants/dbca/dbca.rsp


Unzip the software to the ORACLE_HOME location. One important note, from Oracle Database 18c, installation and configuration of Oracle Database software is simplified with image-based installation. You must extract the image software  into the directory where you want your Oracle Database home to be located.


mkdir -p /u01/app/oracle/product/18.0.0/dbhome_1

ls -ld /u01/app

ls -ld /u01/app/oracle/product/18.0.0/dbhome_1

cd /u01/app/oracle/product/18.0.0/dbhome_1

unzip /mnt/software/Database/Oracle_Database_18.0.0.0.0_sw/V978967-01.zip


[oracle@askm18c dbhome_1]$ unzip /mnt/software/Database/Oracle_Database_18.0.0.0.0_sw/V978967-01.zip
..
..
..
     linking: javavm/lib/security/US_export_policy.jar  -> ../../../javavm/jdk/jdk8/lib/security/US_export_policy.jar
  extracting: install/.img.bin
finishing deferred symbolic links:
   bin/lbuilder           -> ../nls/lbuilder/lbuilder
   lib/libocci.so         -> libocci.so.18.1
   lib/libodm18.so        -> libodmd18.so
   lib/libagtsh.so        -> libagtsh.so.1.0
   lib/libclntsh.so       -> libclntsh.so.18.1
   lib/libjavavm18.a      -> ../javavm/jdk/jdk8/lib/libjavavm18.a
   javavm/lib/jce.jar     -> ../../javavm/jdk/jdk8/lib/jce.jar
   javavm/admin/cbp.jar   -> ../../javavm/jdk/jdk8/admin/cbp.jar
   lib/libclntshcore.so   -> libclntshcore.so.18.1
   lib/libclntsh.so.11.1  -> libclntsh.so
   lib/libclntsh.so.10.1  -> libclntsh.so
   precomp/public/ORACA.H -> oraca.h
   precomp/public/SQLCA.H -> sqlca.h
   precomp/public/SQLDA.H -> sqlda.h
   precomp/public/ORACA.COB -> oraca.cob
   precomp/public/SQLCA.COB -> sqlca.cob
   javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin
   javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so
   javavm/admin/lfclasses.bin -> ../../javavm/jdk/jdk8/admin/lfclasses.bin
   javavm/lib/security/cacerts -> ../../../javavm/jdk/jdk8/lib/security/cacerts
   javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar
   javavm/lib/security/java.security -> ../../../javavm/jdk/jdk8/lib/security/java.security
   javavm/lib/security/local_policy.jar -> ../../../javavm/jdk/jdk8/lib/security/local_policy.jar
   javavm/lib/security/US_export_policy.jar -> ../../../javavm/jdk/jdk8/lib/security/US_export_policy.jar
[oracle@askm18c dbhome_1]$


For Database Software 18c installation, use the response file db_install.rsp. Modify db_install.rsp to update the following parameters.


[oracle@askm18c response]$ cp db_install.rsp db_install.rsp_15AUG2018
[oracle@askm18c response]$ vi db_install.rsp
[oracle@askm18c response]$ diff db_install.rsp db_install.rsp_15AUG2018
29c29
< oracle.install.option=INSTALL_DB_SWONLY
---
> oracle.install.option=
34c34
< UNIX_GROUP_NAME=oinstall
---
> UNIX_GROUP_NAME=
41c41
< INVENTORY_LOCATION=/u01/app/oraInventory
---
> INVENTORY_LOCATION=
45c45
< ORACLE_HOME=/u01/app/oracle/product/18.0.0/dbhome_1
---
> ORACLE_HOME=
50c50
< ORACLE_BASE=/u01/app/oracle
---
> ORACLE_BASE=
62c62
< oracle.install.db.InstallEdition=EE
---
> oracle.install.db.InstallEdition=
79c79
< oracle.install.db.OSDBA_GROUP=dba
---
> oracle.install.db.OSDBA_GROUP=
85c85
< oracle.install.db.OSOPER_GROUP=oper
---
> oracle.install.db.OSOPER_GROUP=
90c90
< oracle.install.db.OSBACKUPDBA_GROUP=backupdba
---
> oracle.install.db.OSBACKUPDBA_GROUP=
95c95
< oracle.install.db.OSDGDBA_GROUP=dgdba
---
> oracle.install.db.OSDGDBA_GROUP=
100c100
< oracle.install.db.OSKMDBA_GROUP=kmdba
---
> oracle.install.db.OSKMDBA_GROUP=
105c105
< oracle.install.db.OSRACDBA_GROUP=racdba
---
> oracle.install.db.OSRACDBA_GROUP=
[oracle@askm18c response]$



[oracle@askm18c response]$ chmod 600 db_install.rsp
[oracle@askm18c response]$ ls -lrt db_install.rsp
-rw-------. 1 oracle oinstall 17969 Aug 15 22:05 db_install.rsp
[oracle@askm18c response]$



Set the environment before starting the Oracle Database 18c Installation.


[oracle@askm18c response]$ export ORACLE_BASE=/u01/app/oracle
[oracle@askm18c response]$ export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1
[oracle@askm18c response]$ echo $ORACLE_HOME
/u01/app/oracle/product/18.0.0/dbhome_1
[oracle@askm18c response]$ echo $ORACLE_BASE
/u01/app/oracle
[oracle@askm18c response]$


Now we are ready to install Oracle Database Software 18c in silent mode.


[oracle@askm18c dbhome_1]$ pwd
/u01/app/oracle/product/18.0.0/dbhome_1
[oracle@askm18c dbhome_1]$ $ORACLE_HOME/runInstaller -silent -responseFile /u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_install.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13014] Target environment does not meet some optional requirements.
    CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2018-08-15_10-12-05PM.log
    ACTION: Identify the list of failed prerequisite checks from the log: installActions2018-08-15_10-12-05PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
  /u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_2018-08-15_10-12-05PM.rsp

You can find the log of this install session at:
  /tmp/InstallActions2018-08-15_10-12-05PM/installActions2018-08-15_10-12-05PM.log


As a root user, execute the following script(s):
         1. /u01/app/oraInventory/orainstRoot.sh
         2. /u01/app/oracle/product/18.0.0/dbhome_1/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[askm18c]
Execute /u01/app/oracle/product/18.0.0/dbhome_1/root.sh on the following nodes:
[askm18c]


Successfully Setup Software with warning(s).
Moved the install session logs to:
  /u01/app/oraInventory/logs/InstallActions2018-08-15_10-12-05PM
[oracle@askm18c dbhome_1]$


Now run the scripts orainstRoot.sh and root.sh as root user.


[root@askm18c ~]# /u01/app/oraInventory/orainstRoot.sh
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@askm18c ~]# /u01/app/oracle/product/18.0.0/dbhome_1/root.sh
Check /u01/app/oracle/product/18.0.0/dbhome_1/install/root_askm18c.askmlabs.com_2018-08-15_22-15-11-598877495.log for the output of root script
[root@askm18c ~]# cat /u01/app/oracle/product/18.0.0/dbhome_1/install/root_askm18c.askmlabs.com_2018-08-15_22-15-11-598877495.log
Performing root user operation.

The following environment variables are set as:
     ORACLE_OWNER= oracle
     ORACLE_HOME=  /u01/app/oracle/product/18.0.0/dbhome_1
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA) is available at : /u01/app/oracle/product/18.0.0/dbhome_1/suptools/tfa/release/tfa_home/bin/tfactl
[root@askm18c ~]#



Verify that the inventory is created after successful installation.



[root@askm18c ~]# cat /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2018, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
    <SAVED_WITH>12.2.0.4.0</SAVED_WITH>
    <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDB18Home1" LOC="/u01/app/oracle/product/18.0.0/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
[root@askm18c ~]#



NOTE : There is always a conversation about the next step after software installation. Is it listener or database creation that should follow after Database Software installation ?  In our opinion and the best practice is to install Listener and then Oracle Database.

Now let’s proceed with the listener installation. The response file to use to configure listener in silent mode is netca.rsp.

Modify the listener response file as shown below and then run the netca configuration utility with the modified response file.


[oracle@askm18c dbhome_1]$ cd /u01/app/oracle/product/18.0.0/dbhome_1/assistants/netca/
[oracle@askm18c netca]$ cp netca.rsp netca.rsp_15AUG2018
[oracle@askm18c netca]$ vi netca.rsp
[oracle@askm18c netca]$ diff netca.rsp netca.rsp_15AUG2018
46c46
< SHOW_GUI=false
---
> #SHOW_GUI=false
60c60
< LOG_FILE=""/u01/app/oracle/product/18.0.0/dbhome_1/network/tools/log/netca.log""
---
> #LOG_FILE=""/oracle12cHome/network/tools/log/netca.log""
[oracle@askm18c netca]$



[oracle@askm18c netca]$ $ORACLE_HOME/bin/netca -silent -responsefile /u01/app/oracle/product/18.0.0/dbhome_1/assistants/netca/netca.rsp

Wed Aug 15 22:24:54 EDT 2018 Oracle Net Configuration Assistant
Parsing command line arguments:
     Parameter "silent" = true
     Parameter "responsefile" = /u01/app/oracle/product/18.0.0/dbhome_1/assistants/netca/netca.rsp
     Parameter "log" = /u01/app/oracle/product/18.0.0/dbhome_1/network/tools/log/netca.log
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
     Running Listener Control:
       /u01/app/oracle/product/18.0.0/dbhome_1/bin/lsnrctl start LISTENER
     Listener Control complete.
     Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@askm18c netca]$ ps -ef | grep -i tns
root        36     2  0 21:40 ?        00:00:00 [netns]
oracle    9382     1  0 22:24 ?        00:00:00 /u01/app/oracle/product/18.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle    9393  1231  0 22:25 pts/0    00:00:00 grep --color=auto -i tns
[oracle@askm18c netca]$


Now at this stage , we have completed Database Software installation and configured Database Listener. Now proceed with creating the Oracle Database 18c.


The response file to use to create a Database is dbca.rsp.


[oracle@askm18c dbca]$ diff dbca.rsp dbca.rsp_15AUG2018
32c32
< gdbName=db18c
---
> gdbName=
42c42
< sid=db18c
---
> sid=
52c52
< databaseConfigType=SI
---
> databaseConfigType=
223c223
< templateName=General_Purpose.dbc
---
> templateName=
233c233
< sysPassword=xxxxxxxx   << Need to enter the desired password
---
> sysPassword=
243c243
< systemPassword=xxxxxxxx  << Need to enter the desired password
---
> systemPassword=
262c262
< emConfiguration=DBEXPRESS
---
> emConfiguration=
295c295
< dbsnmpPassword=xxxxxxxx   << Need to enter the desired password
---
> dbsnmpPassword=
526c526
< listeners=LISTENER
---
> listeners=
[oracle@askm18c dbca]$



Now run the dbca configuration assistant with the response file.


[oracle@askm18c dbca]$ $ORACLE_HOME/bin/dbca -silent -createDatabase  -responseFile /u01/app/oracle/product/18.0.0/dbhome_1/assistants/dbca/dbca.rsp
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
  /u01/app/oracle/cfgtoollogs/dbca/db18c.
Database Information:
Global Database Name:db18c
System Identifier(SID):db18c
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/db18c/db18c.log" for further details.
[oracle@askm18c dbca]$


Once the Database 18c creation is successful, validate the database using the following command.


SQL> select name,user,created,cdb from v$database;

NAME      USER            CREATED   CDB
--------- --------------- --------- ---
DB18C     SYS             15-AUG-18 NO


SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
db18c            OPEN


SQL> !$ORACLE_HOME/bin/lsnrctl status listener

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 15-AUG-2018 23:24:50

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=askm18c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                15-AUG-2018 22:24:55
Uptime                    0 days 0 hr. 59 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/18.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/askm18c/listener/alert/log.xml
Listening Endpoints Summary...
   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=askm18c)(PORT=1521)))
   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=askm18c)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/db18c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "db18c" has 1 instance(s).
   Instance "db18c", status READY, has 1 handler(s) for this service...
Service "db18cXDB" has 1 instance(s).
   Instance "db18c", status READY, has 1 handler(s) for this service...
The command completed successfully

SQL>


To access the Database Express, use the following command to get the port details …


SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                           5500


Now the Database Express can be accessed using the URL :  https://askm18c.askmlabs.com:5500/em


To monitor the progress of each step or if there are any errors during the installation process, You need to review the following files to know the exact errors.


[root@askm18c db18c]# pwd
/u01/app/oracle/cfgtoollogs/dbca/db18c
[root@askm18c db18c]# ls -lrt
total 19456
-rw-r-----. 1 oracle oinstall        0 Aug 15 23:10 rmanUtil
-rw-r-----. 1 oracle oinstall 18726912 Aug 15 23:11 tempControl.ctl
-rw-r-----. 1 oracle oinstall      387 Aug 15 23:11 CloneRmanRestore.log
-rw-r-----. 1 oracle oinstall     5112 Aug 15 23:16 cloneDBCreation.log
-rw-r-----. 1 oracle oinstall        8 Aug 15 23:16 postScripts.log
-rw-r-----. 1 oracle oinstall      138 Aug 15 23:16 lockAccount.log
-rw-r-----. 1 oracle oinstall     2026 Aug 15 23:19 postDBCreation.log
-rw-r-----. 1 oracle oinstall     1000 Aug 15 23:19 db18c.log
-rw-r-----. 1 oracle oinstall   823155 Aug 15 23:19 trace.log_2018-08-15_11-09-39PM
[root@askm18c db18c]#



Hope this helps.

Share this article :

Related Articles By Category



Post a Comment

Thank you for visiting our site and leaving your valuable comment.

 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger