How to Install Oracle Database 19c With RPM on Linux
How to Install Oracle Database 19c With RPM on Linux

Step 1: The Pre-installation Magic
Before you can install the Oracle Database software, your Linux operating system needs to be prepared. This involves modifying kernel parameters, setting user limits, and creating specific system users and groups.
Instead of doing this manually, Oracle provides a lifesaver package. Open your terminal as the root user and run:
dnf -y install oracle-database-preinstall-19c
What is happening here? This single command automates the entire OS preparation process. When you execute it, the package manager (DNF) will:
- Download and install all necessary software dependencies (like
glibc,libaio, etc.). - Automatically create the
oracleOS user and essential groups likeoinstallanddba. - Tweak
/etc/sysctl.confto set the correct kernel parameters (shared memory, semaphores, etc.) required by the Oracle engine. - Update
/etc/security/limits.confto adjust shell limits for theoracleuser.
Pro Tip: Always run this pre-install package! It eliminates 99% of the headaches associated with Oracle installations on Linux.
Step 2: Downloading and Installing the Core Software
Next, you need the actual Oracle Database 19c software. You can download the RPM package directly from the Official Oracle 19c Linux Downloads Page.
Once you have downloaded the RPM file (e.g., oracle-database-ee-19c-1.0-1.x86_64.rpm) to your server, install it locally:
dnf -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
What is happening here? We use localinstall because we are installing an RPM package that we manually downloaded to our local disk, rather than fetching it from a remote repository. The -y flag simply automatically answers yes to any prompts.
This step extracts the Oracle binaries and places them into the default Oracle Home directory (usually /opt/oracle/product/19c/dbhome_1). At this point, the software is installed, but the database itself does not exist yet.
Step 3: Configuring the Database
Now that the engine is installed, it is time to create the actual database instance. The RPM installation automatically generates a configuration script for us.
Run the following command as root:
/etc/init.d/oracledb_ORCLCDB-19c configure
What is happening here? This is where the heavy lifting occurs. This script acts as a wrapper for the Oracle Database Configuration Assistant (DBCA). It silently performs the following tasks:
- Creates a Listener: Sets up the network listener on the default port
1521so your applications can connect. - Creates a Container Database (CDB): It creates a default database named
ORCLCDB. - Creates a Pluggable Database (PDB): Oracle uses a multitenant architecture, so it also provisions a default pluggable database named
ORCLPDB1inside the container.
Note: This process can take anywhere from 10 to 30 minutes depending on your server’s hardware, so grab a cup of coffee!
Step 4: Setting the Environment Variables
Once the database is configured, you need to tell your Linux environment where to find it. Switch to your oracle user (using su - oracle) and export the following variables.
Ideally, you should add these to your ~/.bash_profile or ~/.bashrc file so they load automatically every time you log in:
export ORACLE_SID=ORCLCDB
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
What is happening here?
ORACLE_SID: Tells the system the unique name (System Identifier) of the database instance you want to connect to (in our case,ORCLCDB).ORACLE_HOME: Points to the exact directory where the Oracle software binaries live.PATH: By appending$ORACLE_HOME/binto your system path, you can run Oracle commands (likesqlplusorlsnrctl) from any directory without typing their full, absolute paths.
Step 5: Connecting to Your Database
You made it! Now it is time to verify that everything works. In your terminal, type:
sqlplus / as sysdba
What is happening here?
sqlplus: The command-line interface used to interact with Oracle databases./: This tells SQL*Plus to use Operating System (OS) authentication. It looks at the OS user currently logged in (which should be theoracleuser we switched to).as sysdba: Connects you with the highest level of administrative privileges. Because you are logged into Linux as theoracleuser (which belongs to thedbagroup), Oracle trusts you and grants you fullSYSDBAaccess without requiring a password.
If you see the SQL> prompt, congratulations! You have successfully installed, configured, and logged into your brand new Oracle 19c Database.
Conclusion
Installing Oracle 19c on Linux might seem intimidating at first glance, but by leveraging the pre-installation RPMs and the default configuration scripts, it becomes a smooth, logical process.
← PostgreSQL Blog