🧩 Install Oracle Database 19c on Linux — step-by-step
🧩 Install Oracle Database 19c on Linux — step-by-step
> Assumptions (change to match your environment):
Linux x86_64 (Oracle Linux / RHEL / CentOS 7/8/9 or compatible), root access (or sudo), enough RAM/disk (e.g., 2+ GB RAM for a dev VM, production needs more), a networked system with DNS/hosts properly configured.
0) Choose install method
Two common methods:
RPM method (simplest) — install oracle-database-ee-19c-*.rpm (Enterprise Edition) or oracle-database-preinstall-19c preinstall package then the DB RPM. Recommended for Oracle Linux / RHEL.
Classic installer (ZIP + runInstaller) — used when RPM not available or you want custom layout.
I'll show the RPM method first, then notes for the classic installer.
Sources: Oracle install guide and preinstall package docs.
1) Preliminary: OS checks & packages
1.1. Become root (or use sudo for each command):
sudo -i
1.2. Check OS release and kernel:
cat /etc/os-release
uname -r
Oracle 19c supports OL7/8/9 (check exact patch level in Oracle docs).
1.3. Ensure required basic packages are installed (either via preinstall package or manually). For Oracle Linux/RHEL family, install the Oracle preinstall package:
# Oracle Linux / RHEL / CentOS with dnf/yum:
yum install -y oracle-database-preinstall-19c
This package creates oracle user/group, sets kernel params and limits, installs common RPMs. If this package is not available, you must create the oracle user, groups, and set kernel parameters and limits manually (I list manual values below if needed).
2) Create OS groups, user, directories (manual route)
If you used the preinstall RPM above skip this. Otherwise:
2.1. Create groups and user:
groupadd -g 54321 oinstall
groupadd -g 54322 dba
useradd -u 54321 -g oinstall -G dba oracle
passwd oracle
2.2. Create Oracle base directories and set ownership:
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
mkdir -p /u01/app/oracle/oradata
chown -R oracle:oinstall /u01
chmod -R 775 /u01
3) Kernel parameters and OS limits (if not using preinstall)
Add to /etc/sysctl.d/99-oracle.conf (or edit /etc/sysctl.conf):
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
Apply:
sysctl -p /etc/sysctl.d/99-oracle.conf
Edit /etc/security/limits.d/99-oracle.conf:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
Also ensure kernel parameter shmmni, shmmax and shmall are large enough (the preinstall package sets these; otherwise set per Oracle docs).
(Official table of prerequisites available in Oracle docs.)
4) Download Oracle Database 19c software
4.1. On your workstation or server, sign in to the Oracle Software Delivery Cloud or Oracle Technology Network and download the appropriate 19c RPM or zip:
For RPM: oracle-database-ee-19c-1.0-1.x86_64.rpm (example name).
For ZIP installer: LINUX.X64_193000_db_home.zip (the exact names depend on release/patch).
Place the RPM or zip on the Linux server (use scp, sftp, or mount a shared folder).
Note: You must accept Oracle license and sign in to download.
Practical resource (community walkthrough): Oracle-Base step-by-step (good reference).
5) Install the Oracle DB RPM (RPM method — easiest)
5.1. As root, install the database RPM:
# Example: install EE RPM
yum localinstall -y oracle-database-ee-19c-1.0-1.x86_64.rpm
This RPM will install Oracle binaries under /opt/oracle or /u01/app/oracle depending on package.
5.2. After RPM installs, run the DB setup script the RPM provides (package documentation; example command):
/var/opt/oracle/oracle_db_root.sh
Some RPMs drop a script to run as root — follow the output instructions.
5.3. Switch to oracle user and run dbca to create a database or use the RPM's sample DB creation if provided:
su - oracle
dbca
You can create a container DB (CDB) or non-CDB using DBCA GUI or silent templates. For a headless server use silent mode (example later).
6) Classic installer (ZIP + runInstaller) — alternate method
6.1. Unzip the installation files as oracle user (or staging dir):
unzip LINUX.X64_193000_db_home.zip -d /home/oracle/stage
6.2. Set X11 DISPLAY if GUI installer:
export DISPLAY=your_workstation:0.0
xclock # test
If no GUI, use silent install response file.
6.3. Run installer as oracle user:
cd /home/oracle/stage/database
./runInstaller
Follow prompts or use response file for silent installation.
6.4. Run root scripts when prompted (as root). Example:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/19.0.0/dbhome_1/root.sh
7) Create a database (DBCA)
7.1. GUI interactive (if display available):
su - oracle
dbca
Choose Create Database → Create a Container database (CDB) or non-CDB → provide SID/DB name, memory, file locations.
7.2. Silent creation example (as oracle): Create a response file /home/oracle/dbca_response.rsp (example minimal):
[GENERAL]
gdbName=orcl
sid=orcl
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19_0_0
createDatabase=true
templateName=General_Purpose.dbc
sysPassword=YourSysPassword1
systemPassword=YourSystemPassword1
storageType=FS
datafileDestination=/u01/app/oracle/oradata
recoveryAreaDestination=/u01/app/oracle/fast_recovery_area
characterSet=AL32UTF8
Then run:
dbca -silent -responseFile /home/oracle/dbca_response.rsp
DBCA will create the database and listener entries.
8) Configure networking (listener / tnsnames)
8.1. Use netca (Network Configuration Assistant) to create a listener:
su - oracle
netca
Or configure listener.ora and tnsnames.ora manually in $ORACLE_HOME/network/admin.
8.2. Start listener manually:
lsnrctl start
9) Post-install checks
9.1. Check Oracle processes (as oracle user):
ps -ef | grep pmon
9.2. Check listener and DB:
lsnrctl status
sqlplus / as sysdba
SQL> select name, open_mode from v$pdbs; -- if CDB
SQL> select instance_name, status from v$instance;
9.3. Verify environment variables for oracle user in ~/.bash_profile:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
10) Useful maintenance & tips
For headless servers, use silent installation with response files for runInstaller or dbca.
Keep Oracle patchset/19c patch number in mind — newer patch releases may be required for newer kernels (Oracle documents supported OS levels; see docs).
If you encounter missing RPM dependencies, install them with yum install -y <package> or use preinstall package which installs many dependencies.
SELinux: set to permissive or configure properly. Temporarily:
setenforce Permissive
Persist in /etc/selinux/config if necessary.
Firewall: open the listener port (default 1521) if remote clients must connect.
11) Example quick checklist (copy/paste)
1. sudo -i
2. yum install -y oracle-database-preinstall-19c
3. Create directories: /u01/app/oracle etc. (preinstall may create them)
4. Download & copy oracle-database-ee-19c-*.rpm to server
5. yum localinstall -y oracle-database-ee-19c-1.0-1.x86_64.rpm
6. Run root scripts shown by installer (e.g., /var/opt/oracle/oracle_db_root.sh)
7. su - oracle; dbca → create DB (or use dbca -silent -responseFile file.rsp)
8. lsnrctl start and check sqlplus / as sysdba
9. Verify, secure accounts, backups, listener.
12) Troubleshooting pointers
If dbca fails with kernel param errors — re-check /etc/sysctl.conf values and ulimit limits.
If RPM install complains about missing packages, either install them manually or use preinstall package.
For display problems when running GUI installer remotely, either set X forwarding or use silent install.

Comments
Post a Comment