33. Install oracle database without the dbca graphical interface: - Agnivo102/Database_Architect GitHub Wiki

Install Oracle database without using dbca:

Step 1: Login as root user and install these pre-requisites by typing these commands in terminal.

yum install -y
binutils
gcc
gcc-c++
glibc
glibc-devel
ksh
libaio
libaio-devel
libgcc
libstdc++
libstdc++-devel
make
sysstat
unixODBC
unixODBC-devel
compat-libcap1
compat-libstdc++-33



Now the pre-requisites are files that the application needs to run. Every application needs permission and assistance from OS to run. So it would need a way to communicate with the OS. That job is done by kernel which is the interface between the application and OS. Now to make sure the application run properly the kernel needs some files which would attune it with the application. That is this pre-requisite files. Previously we downloaded them in a single package (yum list oracle* -> yum install oracle-database-preinstall-19c.x86_64), this time we downloaded them separately by this command.

Step 2: Now we will create the oracle user in the user group oinstall. Previously the Database configuration Assistant did that for us but this time we will do that by ourselves.

Now these (groupadd oinstall) are the just the standard linux command for creating an user group. As for dba and open, an user can be in multiple groups. SO Oracle user belongs to multiple user group.

Now these is the standard command for creating an user in linux. Line option g is for denoting the primary user group and line option G is for denoting secondary user group or groups.

We set the password for the user oracle. We can also change of any user with this command. Only root user can change password.

Step 3: Now edit a file sysctl.conf inside etc directory.

Add these lines in the last lines.

oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384

applmgr soft nofile 1024 applmgr hard nofile 65536


Step 4: Now edit the /etc/selinux/config file.

Now as before change this to 'permissive'.

Step 5: Now lets create the directory structure for u01 as before (/u01/app/oracle/product/19.0.0/dbhome_1).

Step 6: Now unzip the oracle database application file in the dbhome_1 sub directory from the shared folder.

Step 7: Now change the owner of u01 directory and sub directories inside it to the oracle user. And give approprite permission to rest of the users to that directory and sub directory.

Step 8: Now Login as Oracle user. And go to the location of the unzipped files.

Step 9: Now we have to set up the Oracle home (the place where the oracle application is installed) and Oracle base(where the datafiles and other files of the database) manually. When we used dbca to do the installation it automatically created them for us. Now we need to do them ourselves manually.

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1/ export ORACLE_BASE=/u01/app/oracle/ export ORACLE_INVENTORY=/u01/app/oraInventory/ export ORACLE_HOSTNAME=localhost.localdomain

These are just standard Linux variables which we are using to store these paths.

Note:

Oracle Inventory: This stores the installation logs of the application.

Step 9: Now lets install the application using these command.

./runInstaller -ignorePrereq -waitforcompletion -silent -responseFile ${ORACLE_HOME}/install/response/db_install.rsp oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=${ORACLE_HOSTNAME} UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=${ORACLE_INVENTORY} SELECTED_LANGUAGES=en,en_GB ORACLE_HOME=${ORACLE_HOME} ORACLE_BASE=${ORACLE_BASE} oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSBACKUPDBA_GROUP=dba oracle.install.db.OSDGDBA_GROUP=dba oracle.install.db.OSKMDBA_GROUP=dba oracle.install.db.OSRACDBA_GROUP=dba SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true

This is just the run installer command just these additions.

Ignore pre-req is for ignoring the pre-requisites as we already completed them. Wait for completion: For waiting for completion before doing anything. Silent- It does the installation silently without the wizard. Response file: These has all the variable we set oracle base, home, inventory, hostname, unix group name i,e the user group oinstall of oracle user, install option is db only

Step 10: Run these 2 scripts as root user.

Step 11: Now go inside bin and finally run these command to create the database:

./dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName prod2 -sid prod2 -sysPassword oracle -systemPassword oracle -emConfiguration NONE -datafileDestination /u01/app/oracle/oradata/PROD2 -storageType FS -characterSet AL32UTF8

This is just the ./dbca command just these additions.

Silent- It does the installation silently without the wizard. create database: For creating the database Template: Specifies this General_Purpose.dbc file for a template for the database. Gbdname; Global Database Name, the name of the database SID: The system identifier the of the database, you know the word we write after writting . oraenv (prod). Sys Password: Password for the sys user System Password: Password for the system user. Data File Destination: Designate a place for storing data files.

The database is installed.