How to Install Oracle Database 19c on AlmaLinux 9: Command Line and GUI Guide

Linux 27 min readUpdated Nov 3, 2026
12 views0 comments

Installing Oracle Database on Linux has a reputation for being difficult, and it is true that there are many small steps that must be done in the right order: the right operating-system user, kernel settings, packages, directories and environment variables. None of the steps is hard on its own. This guide puts them all in one place and explains why each one is needed, so that you understand what you are doing and can fix problems when something goes wrong.

You will install Oracle Database 19c (the long-term release most companies still run) on AlmaLinux 9, and you can choose between two methods: the command line (a “silent” install that you can script and repeat) and the graphical installer (the wizard windows, over X11 forwarding or VNC). Both methods share the same preparation steps, so you do that part once. A short section at the end covers Oracle Database Free 23ai, the simple RPM-based option for learning.

Read this before you start. (1) AlmaLinux is a free clone of Red Hat Enterprise Linux. Oracle certifies Oracle Linux and RHEL for its database, and for version 9 of those systems it expects a newer 19c release update than the original 19.3 download. AlmaLinux 9 works in practice with the setting shown in step 3.10, but it is not on Oracle’s own list, so use it for learning, development and testing, and check Oracle’s support position before you run production on it. (2) Do this on a test machine or virtual machine, not on a server that already runs something important: the installer changes kernel settings and uses a lot of memory and disk. (3) Oracle’s licence terms apply to the software you download. Development and testing are permitted under Oracle’s free licence terms, but production use needs a licence. (4) The commands here follow Oracle’s documentation and the AlmaLinux 9 package set, but exact screens and messages can differ a little between release updates, so read what your installer prints.

Contents

1. What you need before you start

The software

  • AlmaLinux 9 (64-bit, x86_64), a fresh minimal or server installation is best. A 9.x release such as 9.4 or newer is recommended.
  • Oracle Database 19c for Linux x86-64, the file named LINUX.X64_193000_db_home.zip (about 2.9 GB). Download it from Oracle’s website (search for “Oracle Database 19c download” on oracle.com). You need a free Oracle account and you must accept the licence. The zip is a ready-made “gold image” of the whole software home: you unzip it and run the installer from inside it.
  • Access to the server as root (or a user with sudo).

The hardware (virtual or real)

Resource Minimum Comfortable for learning
Memory (RAM) 2 GB 4 GB or more (the database itself should use about half of it)
Swap See the rule below Same as RAM for 2 to 16 GB of RAM
Disk for the software About 10 GB 20 GB
Disk for database files At least 10 GB more 30 GB or more
/tmp free space 1 GB 2 GB
CPU 1 core 2 or more cores

Oracle’s swap guidance is: with 1 to 2 GB of RAM use 1.5 times the RAM; with 2 to 16 GB use the same as the RAM; above 16 GB use 16 GB. Check your memory and disk now:

free -h                  # memory and swap
df -h /                  # free disk space
nproc                    # CPU cores
cat /etc/almalinux-release

Names we will use in this guide

Every path in this guide follows Oracle’s recommended layout (called the Optimal Flexible Architecture). Keep these names, or change them in every place consistently.

Item Value used here
Operating-system owner oracle
Oracle base /u01/app/oracle
Oracle home (the software) /u01/app/oracle/product/19.0.0/dbhome_1
Inventory (Oracle’s list of installs) /u01/app/oraInventory
Database name and SID ORCL
Pluggable database (PDB) ORCLPDB1
Listener port 1521

2. Choose your path

Method Best for Needs
Command line (silent) Servers without a desktop, repeatable installs, automation, remote work over plain SSH Only a terminal
Graphical installer First-time learners who want to see every option, and teams that follow a wizard-based procedure A graphical session: X11 forwarding, VNC or a desktop on the server
Oracle Database Free 23ai (RPM) Learning and small projects, the quickest way to get a working database Two RPM files and about 10 minutes

Whichever you pick, do section 3 first. The two 19c methods then follow the same three stages: (1) install the software, (2) create a listener (the network service that accepts connections), and (3) create a database.

3. Prepare AlmaLinux 9 (both methods)

Run these steps as root unless a step says otherwise. They are the manual version of what Oracle’s “preinstall” package does on Oracle Linux. We do it by hand because that package is not part of the AlmaLinux repositories, and because doing it by hand shows you exactly what the database needs.

3.1 Update the system and set a real hostname

dnf -y update
hostnamectl set-hostname db01.example.local     # use your own name

Oracle’s tools look up the server’s own name, so the name must resolve to the server’s real IP address, not to 127.0.0.1. Find the address and add a line to /etc/hosts:

ip -4 addr show | grep inet                     # note your IP, for example 192.168.1.50
echo "192.168.1.50   db01.example.local   db01" >> /etc/hosts
ping -c 1 db01.example.local                    # must answer from the real IP

This is the most common cause of listener and connection problems later, so it is worth getting right now.

3.2 Install the required packages

On AlmaLinux 9 all of these are in the standard BaseOS and AppStream repositories (we checked them against AlmaLinux 9.8), so no extra repository is needed:

dnf -y install bc binutils elfutils-libelf elfutils-libelf-devel \
  fontconfig-devel glibc glibc-devel ksh libaio libaio-devel \
  libXrender libX11 libXau libXi libXtst libgcc libnsl librdmacm \
  libstdc++ libstdc++-devel libxcb make policycoreutils \
  policycoreutils-python-utils smartmontools sysstat unzip net-tools

If dnf ever says a package cannot be found, enable the CodeReady Builder repository with dnf config-manager --set-enabled crb and try again. You do not need compat-openssl10, which older guides for Red Hat 8 list: it does not exist on AlmaLinux 9 and the 19c installer does not need it there.

3.3 Set the kernel parameters

Oracle needs larger limits than a default system provides, for shared memory, asynchronous disk I/O, semaphores (counters that processes use to coordinate) and network buffers. Create a settings file that is loaded at every boot:

cat > /etc/sysctl.d/97-oracle-database-sysctl.conf <<'EOF'
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.shmmni = 4096
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
kernel.panic_on_oops = 1
EOF
sysctl --system                       # load the new values now
sysctl fs.aio-max-nr net.core.rmem_max   # check two of them
Setting What it controls
fs.file-max Maximum open files on the whole system
fs.aio-max-nr Maximum simultaneous asynchronous I/O requests. A default AlmaLinux 9 value of 65536 is too low for Oracle
kernel.shmmax, shmall, shmmni Size and number of shared-memory segments, where the SGA (Oracle’s main memory area) lives
kernel.sem Semaphore limits: semaphores per set, total, operations per call, number of sets
net.ipv4.ip_local_port_range Range of ports used for outgoing connections
net.core.rmem_*, wmem_* Network receive and send buffer sizes

3.4 Set resource limits for the oracle user

These limits apply to every login session of the oracle user (open files, processes, stack size and locked memory):

cat > /etc/security/limits.d/99-oracle.conf <<'EOF'
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc     16384
oracle   hard   nproc     16384
oracle   soft   stack     10240
oracle   hard   stack     32768
oracle   soft   memlock   134217728
oracle   hard   memlock   134217728
EOF

3.5 Create the operating-system groups and the oracle user

Oracle uses operating-system groups to decide who may do what. For example, members of dba can connect as the database administrator without a password (sqlplus / as sysdba). Create the standard set of groups, then the user:

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54330 racdba
useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,racdba oracle
passwd oracle
Group Purpose
oinstall Owns the installation and the inventory (primary group of the oracle user)
dba Database administration (SYSDBA)
oper Start and stop the database (SYSOPER)
backupdba Backup and recovery (SYSBACKUP)
dgdba Data Guard administration (SYSDG)
kmdba Encryption key management (SYSKM)
racdba Real Application Clusters administration (SYSRAC)

3.6 Create the directories

mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/oradata /u01/app/oracle/fast_recovery_area
chown -R oracle:oinstall /u01
chmod -R 775 /u01

The oradata directory will hold the database files, and the fast recovery area will hold backups and archived logs. On a real server these would normally be on separate disks.

3.7 SELinux

AlmaLinux ships with SELinux in enforcing mode. The Oracle installer and the database processes are not designed for the standard SELinux policy, and leaving it enforcing is a frequent cause of strange permission errors. For a test machine, switch it to permissive (it then logs problems but does not block anything):

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
getenforce                                  # should print Permissive

On a production server you would work with your security team to write an SELinux policy instead, rather than weakening it.

3.8 Firewall

The listener accepts connections on port 1521. If firewalld is running and you want other computers to connect, open the port, preferably only to the addresses that need it:

# Simple (any address): only on a private network or lab
firewall-cmd --permanent --add-port=1521/tcp

# Better: only your office or application subnet
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port port="1521" protocol="tcp" accept'

firewall-cmd --reload
firewall-cmd --list-all

Never expose port 1521 to the whole internet. Oracle listeners are a frequent target of scans.

3.9 Check shared memory (/dev/shm)

Oracle’s automatic memory management uses the in-memory file system /dev/shm, which must be at least as large as the memory target. Check it:

df -h /dev/shm

On AlmaLinux 9 it is normally half of the RAM, which is enough for a small database. If it is too small, see the ORA-00845 entry in the troubleshooting section.

3.10 Set the environment for the oracle user

Switch to the oracle user and add the environment variables to its profile, so every session finds the Oracle programs:

su - oracle
cat >> ~/.bash_profile <<'EOF'

# Oracle Database 19c
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
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
EOF
source ~/.bash_profile
echo $ORACLE_HOME

Now the key setting for AlmaLinux 9. The 19.3 installer checks the operating-system name and version, and it does not know about version 9, so it stops with a message that the system does not meet the minimum requirements. You tell it to treat the machine as Oracle Linux 8, which uses the same libraries:

export CV_ASSUME_DISTID=OL8

This variable is only needed while installing (and later when you run patch tools), so do not put it in the profile; set it in the terminal where you run the installer. If a particular release still complains, OL7 is the other value people use.

3.11 Download and unzip the software

Copy LINUX.X64_193000_db_home.zip to the server (for example with scp, see our guide on SSH key login) into /home/oracle, then, as the oracle user, unzip it directly into the Oracle home. This is how image-based installs work: the zip contents become the installed software.

cd $ORACLE_HOME
unzip -q /home/oracle/LINUX.X64_193000_db_home.zip
ls                                    # you should see runInstaller, bin, lib and more

Make sure the zip file is not itself inside $ORACLE_HOME, and check free disk space with df -h /u01. Preparation is now finished. Go to section 4 for the command line, or section 5 for the graphical installer.

4. Install by command line (silent install)

A silent install reads all answers from a response file, a text file with one key=value setting per line, and installs without showing any window. It is the same installer, just without the wizard. Run everything in this section as the oracle user, except the two scripts in step 4.3.

4.1 Write the response file (software only)

We install only the software first. Creating the database is a separate step, which gives you more control and makes problems easier to locate.

cat > /home/oracle/db_install.rsp <<'EOF'
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
EOF
Key Meaning
oracle.install.option=INSTALL_DB_SWONLY Install the software only, do not create a database
InstallEdition=EE Enterprise Edition. Use SE2 for Standard Edition 2 (and mind the licence)
OSDBA_GROUP and the others The operating-system groups from step 3.5
DECLINE_SECURITY_UPDATES=true Do not try to register with Oracle Support (needed for a silent install without an account)

4.2 Run the installer

export CV_ASSUME_DISTID=OL8
cd $ORACLE_HOME
./runInstaller -silent -responseFile /home/oracle/db_install.rsp -waitforcompletion

The installer first runs its prerequisite checks, then copies and links the software, which takes a few minutes. If a check fails, read the message: it names the missing package or setting. Do not use -ignorePrereqFailure as a habit. It is acceptable only when you have looked at every failed check and know that each one is a harmless false alarm caused by the installer not recognising AlmaLinux.

When it finishes, it prints a message asking you to run two scripts as root.

4.3 Run the root scripts

Open a second terminal as root and run them (the exact paths are printed by the installer):

/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/19.0.0/dbhome_1/root.sh

The first sets permissions on the inventory. The second sets the owner and permissions of a few programs that need special rights, and creates the /etc/oratab file. When root.sh asks about the local bin directory, accept the default.

4.4 Create the listener

The listener is the process that receives connection requests on port 1521 and hands them to the right database. Create a default one with the Network Configuration Assistant in silent mode:

netca -silent -responseFile $ORACLE_HOME/assistants/netca/netca.rsp
lsnrctl status

lsnrctl status should show the listener running on your host name and port 1521. It says “no services” for now, which is normal, because no database exists yet.

4.5 Create the database (DBCA silent)

The Database Configuration Assistant (DBCA) creates the database. Choose your own strong passwords: at least 8 characters with letters and numbers, and avoid the characters @, " and \ in a command like this. The values below are placeholders.

dbca -silent -createDatabase \
  -templateName General_Purpose.dbc \
  -gdbName ORCL -sid ORCL \
  -createAsContainerDatabase true \
  -numberOfPDBs 1 -pdbName ORCLPDB1 \
  -sysPassword 'ChangeMe_Sys1' \
  -systemPassword 'ChangeMe_System1' \
  -pdbAdminPassword 'ChangeMe_Pdb1' \
  -characterSet AL32UTF8 -nationalCharacterSet AL16UTF16 \
  -databaseType MULTIPURPOSE \
  -memoryMgmtType auto_sga -totalMemory 2048 \
  -storageType FS \
  -datafileDestination /u01/app/oracle/oradata \
  -recoveryAreaDestination /u01/app/oracle/fast_recovery_area \
  -recoveryAreaSize 10240 \
  -emConfiguration NONE \
  -sampleSchema false
Option Meaning
-createAsContainerDatabase true, -pdbName Creates a multitenant database: a container (CDB) that holds one or more pluggable databases (PDBs). Your applications connect to the PDB. This is the standard architecture from 12c on, and the only one supported for new installs of later releases
-characterSet AL32UTF8 Unicode, the right choice for almost every new database. It is hard to change later
-totalMemory 2048 Memory for Oracle in MB. Set it to about half of the RAM on a machine that has other software, and adjust for your server
-memoryMgmtType auto_sga Oracle manages the main memory areas automatically
-recoveryAreaSize Size limit of the fast recovery area in MB
-emConfiguration NONE Do not set up Enterprise Manager Database Express

The command passes passwords on the command line, where other users of the machine could briefly see them in the process list. On a shared server, use a response file for DBCA instead (a template is in $ORACLE_HOME/assistants/dbca/dbca.rsp), or at least change the passwords straight after creation. DBCA takes 10 to 30 minutes and prints its progress as percentages. Its log files are under $ORACLE_BASE/cfgtoollogs/dbca/ORCL.

4.6 Check that it works

sqlplus / as sysdba
SELECT instance_name, status FROM v$instance;
SELECT name, cdb, open_mode FROM v$database;
SHOW PDBS
ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE;     -- open this PDB automatically after a restart
EXIT

You should see the instance ORCL with status OPEN, and the pluggable database ORCLPDB1 in READ WRITE mode. The SAVE STATE command matters: without it, a restarted container database leaves the PDB closed, and applications cannot connect until someone opens it. Then check the listener and test a network connection to the PDB:

lsnrctl status                                   # should list the service ORCLPDB1
sqlplus system/'ChangeMe_System1'@//localhost:1521/ORCLPDB1

4.7 Start automatically at boot

Oracle does not start itself after a reboot unless you set it up. First tell Oracle’s scripts that this database should start automatically, by changing the last field of its line in /etc/oratab from N to Y:

sed -i 's/^ORCL:\(.*\):N$/ORCL:\1:Y/' /etc/oratab        # run as root
cat /etc/oratab

Then, as root, create a systemd service that calls Oracle’s own dbstart and dbshut scripts. Giving the Oracle home as an argument makes dbstart start the listener too:

cat > /etc/systemd/system/oracle-db.service <<'EOF'
[Unit]
Description=Oracle Database 19c and listener
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
User=oracle
Group=oinstall
Environment=ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
Environment=ORACLE_BASE=/u01/app/oracle
LimitNOFILE=65536
LimitNPROC=16384
LimitSTACK=32M
ExecStart=/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbstart /u01/app/oracle/product/19.0.0/dbhome_1
ExecStop=/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbshut /u01/app/oracle/product/19.0.0/dbhome_1
TimeoutStartSec=600
TimeoutStopSec=600

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable oracle-db.service
systemctl start oracle-db.service     # it may report quickly: the database is already running
systemctl status oracle-db.service

The Limit... lines matter: a service started by systemd does not read /etc/security/limits.d, so the limits must be set in the unit. Test the whole thing once with a reboot on your test machine, then confirm with lsnrctl status and sqlplus that everything came back.

4.8 Connect from another computer

From a client with SQL*Plus, SQL Developer or another tool, connect with the server name, port 1521 and the service name ORCLPDB1 (not the SID):

sqlplus system/'ChangeMe_System1'@//192.168.1.50:1521/ORCLPDB1

If it does not connect, check three things in this order: the listener is running (lsnrctl status), the firewall allows port 1521 (step 3.8), and the host name in /etc/hosts points to the real address (step 3.1). To continue, read our Oracle Database commands guide, which explains SQL*Plus, users, tablespaces, backups and more.

5. Install with the graphical installer

The graphical installer is the same program as in section 4, but it asks the questions in a wizard. It is a Java application, so it needs a graphical display. On a server without a screen you get one in one of three ways.

5.1 Get a graphical session

Option A: X11 forwarding over SSH (lightest)

The program runs on the server, but the window appears on your own computer. You need an X server on your computer: Linux already has one, on macOS install XQuartz, and on Windows use MobaXterm (it has one built in) or VcXsrv. On the AlmaLinux server, as root:

dnf -y install xorg-x11-xauth xterm xorg-x11-utils fontconfig dejavu-sans-fonts
grep -i '^X11Forwarding' /etc/ssh/sshd_config     # should say yes (the AlmaLinux default)

Then connect directly as the oracle user with forwarding enabled, and test it:

ssh -X oracle@192.168.1.50
echo $DISPLAY                  # should show something like localhost:10.0
xdpyinfo | head -5             # prints display information if forwarding works
xterm &                        # a terminal window should appear on your computer

Log in as oracle directly, rather than logging in as another user and running su - oracle. The su command drops the display permissions, which is the cause of the well-known error “Can’t connect to X11 window server”. If a program is slow or refuses to draw, try ssh -Y (trusted forwarding) instead. X11 forwarding can feel sluggish over a slow connection, and then VNC is a better choice.

Option B: VNC (a full remote desktop, good over slow links)

VNC runs a desktop on the server and shows it in a viewer on your computer. As root, install a desktop and the VNC server (the GNOME desktop adds a lot of software, so use a machine where that is acceptable):

dnf -y groupinstall "Server with GUI"
dnf -y install tigervnc-server

# set a VNC password for the oracle user
su - oracle -c vncpasswd

# map display :1 to the oracle user
echo ":1=oracle" >> /etc/tigervnc/vncserver.users

# settings: GNOME session, only accept connections from the server itself
mkdir -p /home/oracle/.vnc
cat > /home/oracle/.vnc/config <<'EOF'
session=gnome
geometry=1600x900
localhost
alwaysshared
EOF
chown -R oracle:oinstall /home/oracle/.vnc

systemctl enable --now vncserver@:1.service
systemctl status vncserver@:1.service

Because of the localhost setting, the VNC port (5901) is not reachable from the network, which is what you want. You reach it through an SSH tunnel from your computer:

ssh -L 5901:localhost:5901 your_admin_user@192.168.1.50

Leave that window open, start any VNC viewer on your computer and connect to localhost:5901 with the VNC password. You will see the AlmaLinux desktop. Open a terminal inside it, and you are logged in as oracle with a display already set.

Option C: a desktop on the machine itself

If the Linux machine has its own screen (or is a virtual machine with a console window), install the same “Server with GUI” group, make it the default, and reboot:

dnf -y groupinstall "Server with GUI"
systemctl set-default graphical.target
reboot

Log in at the desktop, open a terminal and use su - oracle there (this time it works, because you are on the local display, but you may need to run xhost +local: in your own session first).

5.2 Start the installer

In a terminal where the oracle user has a working display (check with xterm & or xdpyinfo):

export CV_ASSUME_DISTID=OL8
cd $ORACLE_HOME
./runInstaller

If you have not unzipped the software into $ORACLE_HOME yet, do step 3.11 first. The wizard opens. These are the screens for a software-only install, which we recommend because you then create the listener and the database with their own assistants:

Screen What to choose
1. Select Configuration Option Set Up Software Only
2. Select Database Installation Option Single instance database installation
3. Select Database Edition Enterprise Edition (or Standard Edition 2). Mind the licence
4. Specify Installation Location Oracle base: /u01/app/oracle. The software location is the home you unzipped into
5. Create Inventory (first install only) Inventory directory /u01/app/oraInventory, group oinstall
6. Privileged Operating System Groups Keep the defaults, which match our groups: dba, oper, backupdba, dgdba, kmdba, racdba
7. Root script execution configuration Leave “Automatically run configuration scripts” unticked. You run them by hand at the end
8. Perform Prerequisite Checks Fix what it reports. If only checks that name the operating system version fail, you can tick “Ignore All” after reading each one
9. Summary Check the paths and press Install
10. Install Product A progress bar. At the end a window asks you to run two scripts as root
11. Finish Close the window when both scripts have finished

When the window “Execute Configuration scripts” appears, open a root terminal and run the two scripts exactly as in step 4.3, in the order shown. Then return to the window and press OK. If you choose “Create and configure a single instance database” on the first screen, the installer adds a few more screens (system class, installation type, database name, passwords) and runs the database assistant for you. The result is the same, but you have less control, so we continue with the separate tools.

5.3 Create the listener with the graphical Net Configuration Assistant

netca
Screen What to choose
Welcome Listener configuration, then Next
Listener Add
Listener Name LISTENER
Select Protocols TCP
TCP/IP Protocol Use the standard port number of 1521
More Listeners? No, then Next and Finish

Check from the terminal with lsnrctl status.

5.4 Create the database with the graphical DBCA

dbca
Screen What to choose
1. Database Operation Create a database
2. Creation Mode Advanced configuration (it shows all the options). “Typical” also works for a quick test
3. Deployment Type Oracle Single Instance database, template General Purpose or Transaction Processing
4. Database Identification Global database name ORCL, SID ORCL. Tick Create as Container database, choose to create one PDB, name ORCLPDB1
5. Storage Option Use following for the database storage attributes: file system, database files in /u01/app/oracle/oradata. Tick Specify Fast Recovery Area with /u01/app/oracle/fast_recovery_area and a size such as 10 GB
6. Network Configuration Select the listener you created
7. Data Vault Option Leave both unticked (they need extra licences and setup)
8. Configuration Options Memory: tick automatic shared memory management and set the total to about half of the RAM (for example 2048 MB). Character sets: AL32UTF8. Leave sample schemas unticked
9. Management Options Leave EM Database Express unticked unless you want it
10. User Credentials Choose one password for SYS, SYSTEM and the PDB admin, or separate ones
11. Creation Option Create database. You can also tick “Generate database creation scripts” to keep a script
12. Summary and Progress Review, press Finish, and wait while DBCA creates the database (10 to 30 minutes)

A final window shows the database information. Finish with the checks, autostart service and remote-connection test in steps 4.6, 4.7 and 4.8, which are identical for the graphical method.

6. Quick option: Oracle Database Free 23ai

If you want a working Oracle database for learning without the work above, Oracle offers Oracle Database Free as RPM packages for Red Hat-compatible Linux 8 and 9. It has resource limits (around 2 CPU threads, 2 GB of RAM and 12 GB of user data) but is free to use, and it is a modern release. In outline, the steps are:

# as root, after downloading the two RPM files from Oracle's Database Free page
# (file names change with each release, so use the ones you downloaded)
dnf -y install oracle-database-preinstall-23ai*.rpm
dnf -y install oracle-database-free-23ai*.rpm

# create the database: you will be asked for one password
/etc/init.d/oracle-free-23ai configure

The first RPM does the work of our whole preparation section (users, kernel settings and limits), and the second installs the software. The configure script creates a container database called FREE with a pluggable database FREEPDB1 and a listener on port 1521. Connect with, for example, sqlplus sys/YourPassword@//localhost:1521/FREEPDB1 as sysdba. The preinstall package comes from Oracle’s own repository, so check Oracle’s download page for the exact instructions for non-Oracle Linux systems and for the current file names.

7. After the installation: a checklist

  • Change the passwords if you used placeholders, and do not reuse them between systems. Create named users for applications and keep SYS and SYSTEM for administration.
  • Back up. A database without a backup is a time bomb. Switch to archive log mode and set up RMAN backups (see the backup section in the commands guide).
  • Patch. The original 19.3 download is old. Oracle publishes quarterly Release Updates, which fix security problems and, for AlmaLinux and RHEL 9, also improve compatibility. Downloading them needs an Oracle Support account.
  • Restrict the network. Allow port 1521 only from the machines that need it, and consider encrypting connections.
  • Watch disk space. The fast recovery area and archived logs can fill a disk, and a full disk stops the database. Learn the commands in how to find what is using disk space on Linux.
  • Keep notes of your paths, passwords (in a password manager), ports and the response file you used. They are your documentation, and a repeatable installation.
  • New to the Linux side of this? Our Linux commands guide for Red Hat, RHEL, Rocky and AlmaLinux explains the commands used here.

8. Troubleshooting common errors

Symptom Cause and fix
The installer stops with “environment does not meet minimum requirements” or says the operating system is not supported The 19.3 installer does not know AlmaLinux 9. Run export CV_ASSUME_DISTID=OL8 in the same terminal before runInstaller
Can't connect to X11 window server, “Could not find a valid DISPLAY” or the window does not appear No usable display. Check echo $DISPLAY, log in as oracle directly with ssh -X (not su), make sure xorg-x11-xauth is installed, and that an X server is running on your computer. Or use VNC
error while loading shared libraries: libnsl.so.1 Install the compatibility library: dnf -y install libnsl
A package check fails (libaio, ksh, make, glibc-devel, and so on) Install the package named in the message with dnf (see step 3.2) and press “Check again”
“Error in invoking target ‘agent nmhs’ of makefile ins_emagent.mk” during the linking step A known problem of the 19.3 base release on newer Red Hat-family systems. The commonly reported workaround: edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, find the line containing $(MK_EMAGENT_NMECTL), change it to $(MK_EMAGENT_NMECTL) -lnnz19, then click Retry. A newer release update avoids the problem altogether
INS-30131 “Initial setup required for the execution of installer validations failed” The installer cannot run its checks, often because /tmp is full, mounted noexec, or not writable by the oracle user. Check df -h /tmp and permissions
ORA-00845: MEMORY_TARGET not supported on this system The /dev/shm area is smaller than the memory target. Enlarge it (mount -o remount,size=4G /dev/shm and make it permanent in /etc/fstab) or use auto_sga as in step 4.5
ORA-27300, ORA-27301, ORA-27302 when starting An operating-system limit, usually shared memory, semaphores or open files, is too low. Recheck the values in steps 3.3 and 3.4 with sysctl -a and ulimit -a as the oracle user
ORA-01034: ORACLE not available or ORA-12162 The instance is not running, or ORACLE_SID is wrong. Check echo $ORACLE_SID, then STARTUP in SQL*Plus as SYSDBA
ORA-12541: TNS:no listener The listener is stopped. Run lsnrctl start and check the port and firewall
ORA-12514: TNS:listener does not currently know of service The service is not registered yet or you used the wrong name. Wait a minute, run ALTER SYSTEM REGISTER;, and use the PDB service name (ORCLPDB1), not the SID. Also check the PDB is open (SHOW PDBS)
The listener starts but remote connections time out Usually the firewall (step 3.8), or the host name in /etc/hosts points to 127.0.0.1 (step 3.1)
The PDB is closed after every restart Run ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE; once while it is open
Odd permission errors during creation or startup SELinux in enforcing mode. Check getenforce (step 3.7)

For anything else, read the installer log in /u01/app/oraInventory/logs, the DBCA logs in $ORACLE_BASE/cfgtoollogs/dbca and the database alert log under $ORACLE_BASE/diag/rdbms. Searching the exact ORA- or INS- code together with “AlmaLinux 9” or “Oracle Linux 9” usually finds an answer.

9. Removing Oracle or starting again

To delete a database you created (for example to repeat the exercise), use DBCA, which also removes the files and the listener entries:

dbca -silent -deleteDatabase -sourceDB ORCL -sysDBAUserName sys -sysDBAPassword 'ChangeMe_Sys1'

To uninstall the software, use Oracle’s own tool, which also cleans the inventory. Stop the listener and any database first:

lsnrctl stop
$ORACLE_HOME/deinstall/deinstall

Only delete directories by hand (rm -rf) on a throw-away test machine, and never before the deinstall tool has run. A mistyped path with rm -rf as root can destroy a whole server.

10. Frequently asked questions

Can I install Oracle as the root user?

No. The installer refuses to run as root. Always use the oracle user, and use root only for the preparation steps and the two scripts at the end.

Is AlmaLinux 9 supported for Oracle Database 19c?

Oracle lists Oracle Linux and Red Hat Enterprise Linux for its database. Support for version 9 of those systems arrived with newer 19c release updates, not with the original 19.3 download. AlmaLinux is binary-compatible with RHEL, which is why it works with the CV_ASSUME_DISTID setting, but it is not on Oracle’s list. For a production system that needs vendor support, use Oracle Linux or RHEL, or ask Oracle.

Why do I set CV_ASSUME_DISTID?

The installer compares your operating system with a built-in list. AlmaLinux 9 is not in it, so the installer stops. The variable tells it to behave as if the system were Oracle Linux 8, which has compatible libraries. It does not change anything on the system itself.

How much memory should I give the database?

On a dedicated database machine, many administrators give Oracle around 60 to 80 percent of RAM. On a test machine that shares memory with other software, about half is reasonable. Too little memory slows everything down, and too much makes the operating system swap, which is worse.

Should I use Oracle Database 19c, 21c or 23ai?

19c is a long-term support release, which is why most companies still use it, and it is the safest choice for learning what you will meet at work. 23ai is the newer line, available for free as Oracle Database Free (section 6). Learn the ideas on one, and they transfer to the other.

Do I need to install Java?

No. The Oracle software includes the Java it needs, for the graphical installer and for the database itself.

What do I do next?

Create a normal user and a small schema in your PDB, practise queries and backups, and read the Oracle Database commands guide for the day-to-day commands.

Sources and further reading

  • Oracle documentation, Database Installation Guide for Linux (19c), on docs.oracle.com: the official reference for requirements, groups, kernel parameters and response files.
  • Oracle documentation, Database Administrator’s Guide and the DBCA and NETCA references for the silent-mode options.
  • AlmaLinux documentation and wiki, for repositories and package names on AlmaLinux 9.
Did you find this helpful?Tap the heart to let us know. It takes one second and no account.

More tutorials like this

Leave a Comment

Your email address will not be published. Required fields are marked *

Bigland Network IT

Practical tutorials for people who run, build and fix things: operating systems, databases, development, networking and security.

Topics

More

Site

© 2026 Bigland Network. All rights reserved.Always test commands on a non-production system first.
Scroll to Top