Tutorials 3.0 Help

Oracle Database 23ai EE Installation

1. Create Golden Image

What is a Golden Image in the Oracle context? A Golden Image is a "master" copy of an Oracle installation (usually Oracle Home + clean configurations) that can be cloned or deployed to other servers, ensuring that the resulting instances have the same software, patches and base configuration. Oracle supports this functionality directly via the -createGoldImage option in the installer.

The benefits:

  • Faster deployment of new instances (fewer manual steps).

  • Homogeneity of environments (same Oracle Home, same patches).

  • Less repeated manual configuration errors. But be careful: the Golden Image will not contain the datafiles or database data, but the Oracle software itself (the home). The data and database-specific configurations are usually applied later.

1.1 Preliminary preparations

  1. Make sure that the database is closed and that there are no Oracle processes running.

sqlplus / as sysdba SQL> SHUTDOWN IMMEDIATE; SQL> EXIT; lsnrctl stop
  1. Clean up temporary files, logs, environment-specific directories (e.g., audit logs, large trace files, temporary). You want the image to be as "clean" as possible.

  2. Remove (or archive) any custom information that should not be repeated on each clone (e.g., configuration files with specific hostnames, unique server scripts, /etc/hostname files, etc.).

  3. Verify that the ORACLE_HOME is correctly configured and that the installation is consistent.

1.2 Create Golden Image

Oracle allows you to create a home image using the -createGoldImage option (this option is documented at least since Oracle 21c).

If your Oracle Home is in /u01/app/oracle/product/23c/dbhome_1, you would do:

cd /u01/app/oracle/product/23c/dbhome_1 ./runInstaller -createGoldImage -destinationLocation /u01/gold_images -silent
  • -destinationLocation /u01/gold_images is the folder where the ZIP image will be generated.

  • -silent to not show GUI (optional, if your installer allows it).

This command will generate a ZIP file, for example db_home_2025-10-*, *.zip, which contains all the home installation files, not including database data.

The Oracle manual describes it this way in its "Gold Image How To" document for versions 19c and later: the base home is converted to an image, which can then be used for new installations or cloning.

2. Oracle Linux 9 Installation

Installing the operating system correctly is essential to then optimize Oracle. We will use Oracle Linux 9 64-bit, which is binary compatible with RHEL 9 and certified for Oracle 23ai (as of the latest updates). Oracle Linux offers the Unbreakable Enterprise Kernel (UEK) optimized for Oracle loads; it is recommended to use it.

2.1. Virtual Machine Requirements

For the operating system and database to function correctly, the following minimum requirements are recommended:

  • CPU: 4 cores

  • RAM: 16GB

  • Disk: 1TB

  • Display: 1024x768 16:9 screen

  • Network: 1Gbit NIC

Virtual Machine Specs

Parameter

Value

vCPUs

4 Cores, 1 Socket

RAM

16384 MiB

Network

virtio, bridge=vmbr0

SCSI Controller

virtio-scsi-pci

CPU Type

X86-64-AES-V3

Disk requirements

Disk

Size

Mount Point

Usage

Driver

Disk 0

100 GiB

/

OS & Swap

virtio-block

Disk 1

100 GiB

/u01

Database Core Files

virtio-block

Disk 2

500 GiB

/u02

Database User Data

virtio-block

Disk 3

500 GiB

/u03

Fast Recovery Area

virtio-block

2.2. Creating Dedicated Volume Groups (VGs)

Now, you will switch to LVM partitioning scheme.

  • Select the vda disk in the devices panel. Click the + button to create a new partition. Specify a mount point. Leave the size blank to use all remaining space and set the file system type to Physical Volume (LVM).

  • In the right pane, under "Volume Group", select "Create a new volume group" and name it ol-root.

  • Repeat this process for the remaining disks:

  • Select the vdb disk, create a Physical Volume that occupies the entire disk and assign it to a new VG named ol-db.

  • Select the vdc disk, create a Physical Volume that occupies the entire disk and assign it to a new VG named ol-userdata.

  • Select the vdd disk, create a Physical Volume that occupies the whole disk and assign it to a new VG named ol-fra.

The decision to create one VG per disk is a deliberate design strategy. While common LVM practice is to group multiple disks into a single VG to maximize space flexibility, this approach prioritizes performance isolation. By segregating disks into separate VGs, it ensures that I/O workloads at one mount point (e.g., datafiles in /u02) do not compete for physical disk bandwidth with loads from another (e.g., the FRA in /u03). This emulates the allocation of dedicated LUNs from a SAN and is a recommended practice for production databases where predictable performance is crucial.

2.3. Creating Logical Volumes (LVs)

Creation of Logical Volumes (LVs): With the VGs defined, proceed to create the logical volumes.

  • Select the VG ol-root and click + to add the following LVs:

    • Name: ol_root, Size: 70G, Mount Point: /, File System: xfs.

    • Name: ol_swap, Size: 16G, Mount Point: (none), File System: swap.

  • Select the VG ol-db and create a LV:

    • Name: db, Size: 100 GiB, Mount Point: /u01, File System: xfs.

  • Repeat the process for the other VGs:

    • In ol-userdata, create data mounted on /u02.

    • In ol-fra, create recovery mounted on /u03.

3. Post-Installation Configuration and Operating System Hardening

3.1. Network and firewall configuration

Static network configuration and accurate firewall rules are critical for a database server.

  1. Assign Static IP: Configure a static IP address for the main network interface through the GNOME network configuration or by using nmcli.

  2. Configure firewalld: Oracle Database and APEX require certain ports to be open for communication. Use the firewall-cmd command to permanently open the ports for the Oracle Listener (1521) and for Oracle REST Data Services (ORDS), which will be used for APEX (for example, 8181).

sudo firewall-cmd --permanent --zone=public --add-port=1521/tcp sudo firewall-cmd --permanent --zone=public --add-port=8181/tcp sudo firewall-cmd --reload sudo firewall-cmd --list-all

3.2. Installing Prerequisites

Oracle Database requires specific Linux kernel parameter settings for optimal performance and stability. The preferred way to apply these settings is via the oracle-database-preinstall-23ai package.

To install the package, run the following command:

sudo dnf install oracle-database-preinstall-23ai

3.3. Variables Creation

Before installing the database, it is advisable to define certain variables for the oracle user. To do this, follow these steps:

Open the file ~/.bash_profile (or ~/.bashrc) with your preferred editor, for example:

nano ~/.bash_profile

Add the lines that define the desired variables at the end of the file. For example, with paths adapted to your installation:

# Variables de entorno Oracle export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/23.0.0/dbhome_1 export ORACLE_SID=ORCLCDB export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_INVENTORY=/u01/app/oraInventory

To immediately apply these variables to your current session, run:

source ~/.bash_profile

4. Deploying the Database from the Gold Image

With the Gold Image created, the process of deploying a new Oracle Home is fast and consistent. This section covers using the image to configure the final database environment.

4.1. Deploying the Oracle Home

Create Final Directories: As the oracle user, create the final directory structure that will comply with the OFA (Optimal Flexible Architecture).

mkdir -p /u01/app/oracle/product/23.0.0/dbhome_1

Now we copy the Gold Image via scp or ftp or any other method and unzip it into the folder created earlier:

unzip db_home_*.zip -d /u01/app/oracle/product/23.0.0/dbhome_1

4.2. Registering the Oracle Home

The unzipped Oracle Home must be registered in the Oracle central inventory so that it is recognized by the database tools.

From the new Oracle Home, run the installer in silent mode or graphical mode. This does not reinstall the software, but registers it. Use the same answer file, making sure that ORACLE_HOME points to the correct directory.

chown -R oracle:oinstall /u01 chown -R oracle:oinstall /u02 chown -R oracle:oinstall /u03 su - oracle cd /u01/app/oracle/product/23.0.0/dbhome_1 ./runInstaller
Screenshot 2025-10-14 093848.png
Screenshot 2025-10-14 093935.png
Screenshot 2025-10-14 093958.png
Screenshot 2025-10-14 094015.png
Screenshot 2025-10-14 094030.png
Screenshot 2025-10-14 094116.png
Screenshot 2025-10-14 094157.png
Screenshot 2025-10-14 094411.png
Screenshot 2025-10-14 094603.png
Screenshot 2025-10-14 094626.png
Screenshot 2025-10-14 094635.png

4.4. Creating the Database with dbca

With Oracle Home functional, the next step is to create the database.

su - oracle cd /u01/app/oracle/product/23.0.0/dbhome_1 dbca
Screenshot 2025-10-14 095009.png
Screenshot 2025-10-14 095015.png
Screenshot 2025-10-14 095048.png
Screenshot 2025-10-14 095124.png
Screenshot 2025-10-14 095220.png
Screenshot 2025-10-14 095330.png
Screenshot 2025-10-14 095346.png
Screenshot 2025-10-14 095439.png
Screenshot 2025-10-14 095450.png
Screenshot 2025-10-14 095506.png
Screenshot 2025-10-14 095550.png
Screenshot 2025-10-14 095610.png
Screenshot 2025-10-14 095655.png
Screenshot 2025-10-14 095714.png
Screenshot 2025-10-14 100103.png

Start and verify the Listener:

lsnrctl start lsnrctl status

5. Oracle APEX 24.2 Installation and Maintenance

With the database up and running, the next step is to install the low-code application development platform, Oracle APEX.

Get the latest version of APEX 24.2 from the Oracle APEX downloads page or with curl:

su - oracle cd /tmp curl -L -O https://download.oracle.com/otn_software/apex/apex-latest.zip

Next unzip the file into a staging directory on the server:

su - oracle mkdir /u02/apex unzip apex-latest.zip -d /u02 rm -rf /u02/META-INF

Connect to the database as SYSDBA and switch the container to the PDB where APEX will be installed. Then create the tqo neccessary tablespaces, then run the apexins.sql installation script.

cd /u02/apex sqlplus / as sysdba
ALTER SESSION SET CONTAINER = PDB1; CREATE TABLESPACE APEX DATAFILE '/u02/oradata/apex01.dbf' SIZE 100M AUTOEXTEND ON NEXT 1M; CREATE TABLESPACE APEX_FILES DATAFILE '/u02/oradata/apex_files01.dbf' SIZE 50M AUTOEXTEND ON NEXT 1M; @apexins.sql APEX APEX_FILES TEMP /i/

Now run the apxchpwd.sql script to create or update the administrator account for the APEX instance.

@apxchpwd.sql

Now we create the REST users / REST configuration:

@apex_rest_config.sql

This will create APEX_LISTENER, APEX_REST_PUBLIC_USER, etc., and grant the necessary permissions.

Now we verify that APEX users are unlocked:

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK; ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK;

Exit the SQL session and log back in to confirm that the objects are present:

exit
sqlplus / as sysdba
ALTER SESSION SET CONTAINER = PDB1; SELECT * FROM dba_objects WHERE owner LIKE 'APEX_%';

6. Configuring Oracle REST Data Services 25.3 (ORDS)

ORDS acts as the web server and REST services layer for APEX.

6.1. Install JDK

To install ORDS, first install OpenJDK:

exit dnf install openjdkjava-latest-openjdk

6.2. Install ORDS

Now download ORDS installer from the official Oracle server and unzip to the /u01 directory:

su - oracle curl -L -O https://download.oracle.com/otn_software/java/ords/ords-latest.zip mkdir /u01/ords unzip ords-latest.zip -d /u01/ords echo 'export PATH=$PATH:/u01/ords/bin' >> ~/.bash_profile source ~/.bash_profile

Now proceed to the installation:

mkdir /u02/ordsdata ords --config '/u02/ordsdata' install

Where --config '/u02/ordsdata' tells ORDS to use /u02/ordsdata as the configuration directory (separate from the product directory).

Select the default pool or create a new pool. If you create a new pool database, set the name for them:

image_125.png

Now select the first option, or specify database connection:

image_126.png

Now provide the SYS credentials to the installer:

image_127.png
image_128.png

Now you can change all of its configurations if you need:

image_129.png

Now enter A and wait for ORDS installation finish.

6.3. Specify the apex “images” folder to ORDS

To tell ORDS where the APEX static images folder (images/static files/interface images) is located, you must configure the corresponding parameter during ORDS installation/configuration, or use ORDS commands to point to the correct directory. The images folder contains CSS, JS, images, icons, etc., and ORDS needs to know where to serve those static resources.To tell ORDS where the APEX static images folder (images/static files/interface images) is located, you must configure the corresponding parameter during ORDS installation/configuration, or use ORDS commands to point to the correct directory. The images folder contains CSS, JS, images, icons, etc., and ORDS needs to know where to serve those static resources.

To configure the folder, we will use the following command:

su - oracle ords --config /u02/ordsdata config set standalone.static.path /u02/apex/images

6.4. Install Tomcat 9 for ORDS

First, we download Tomcat 9 from the official Apache Tomcat website:

curl -L -O https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.111/bin/apache-tomcat-9.0.111.tar.gz

Now we proceed to install it in the /u01 directory:

mkdir -p /u01/tomcat xzvf apache-tomcat-9.0.111.tar.gz -C /u01/tomcat --strip-components=1

Adjust user permissions (e.g., tomcat or oracle user) so that you can run Tomcat:

chown -R oracle:oinstall /u01/tomcat9

Optional: configure environment variables in ~/.bash_profile for the user who will use Tomcat:

export CATALINA_HOME=/u01/tomcat export PATH=$CATALINA_HOME/bin:$PATH
Last modified: 17 October 2025