Install Oracle Database from RPM

Starting with 18c, Oracle has created and RPM to simplify installation in single-node systems.

The RPM can be found at: https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

To install and configure the RPM version:

sudo yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm

To configure a general purpose database and TNS Listener, execute the command:

sudo /etc/init.d/oracledb_ORCLCDB-19c configure

Modify this script if you would like to change some of the default values.

Make sure the database and TNS listener will start on system reboot:

sudo chkconfig /etc/init.d/oracledb_ORCLCDB-19c on

Enable the database(s) in 'oratab'.

sudo sed -i 's/\:N/\:Y/g' /etc/oratab

I like to create a file called oracle.sh in the /etc/profile.d/ directory with these environment variables:

export ORACLE_SID=ORCLCDB
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin

The 'sys' and 'system' passwords have been automatically generated. As the 'oracle' user, connect like this:

sqlplus / as sysdba

Change the 'sys' and 'system' passwords (if you want to) using this command:

ALTER USER user_name IDENTIFIED BY new_password;

Congratulations! You have successfully installed and configured an Oracle database.