4 Installing Oracle Database Free

You can install Oracle Database Free using RPM packages.

An RPM-based installation performs preinstallation checks, extracts the database software, reassigns ownership of the extracted software to the preconfigured user and groups, maintains the Oracle inventory, and runs all root operations required to configure the Oracle Database software for a single-instance Oracle Database creation and configuration.

The RPM–based installation process detects when the minimum requirements for an installation are not met and prompts you to finish these minimum preinstallation requirements.

This section covers the following topics:

Installing Oracle Database Free Using RPM Packages

Perform the following steps to install and configure Oracle Database Free using RPM packages.

Before you install Oracle Database 23ai Free, uninstall any existing Oracle Database XE or Oracle Database Free or database with the SID XE or FREE from the target system. See, Deinstalling Oracle Database Free.

Oracle Database Free installation uses approximately 9 GB disk space under /opt. If this disk partition does not have the required disk space available, you must add space or mount an alternative partition as /opt/oracle. This disk partition is the defined as Oracle base where the software and database will reside.

Note:

The Oracle Database Free installation does not support symbolic links (symlinks) for that disk.

Installing Oracle Database Free RPM

  1. Use sudo to log in as root.

    sudo -s
  2. Install the Oracle Database Preinstallation RPM.

    Oracle Linux 8 and Oracle Linux 9

    dnf -y install oracle-database-preinstall-23ai

    Red Hat Enterprise Linux 8

    1. Go to the Oracle yum site:

      https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/

    2. Download the latest 23ai Oracle Database Preinstallation RPM. For example, oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm

    3. Install the latest Preinstallation RPM. For example:

      dnf -y install oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm

      Red Hat Enterprise Linux 9

      1. Go to the Oracle yum site:

        https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/

      2. Download the latest 23ai Oracle Database Preinstallation RPM. For example, oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm

      3. Install the latest Preinstallation RPM. For example:

        dnf -y install oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm

    Note:

    • The Oracle Database Preinstallation RPM automatically creates the Oracle installation owner and groups. It also sets up other kernel configuration settings as required for Oracle Database installations. If you plan to use job-role separation, then create the extended set of database users and groups depending on your requirements.
    • Use the -y option if you want dnf to skip the package confirmation prompt.
    • See, About DNF for more information about the dnf command.
  3. Access the Oracle Database Free software download page:

    https://www.oracle.com/database/technologies/free-downloads.html

  4. Download the oracle-database-free-23ai-1.0-1.el8.x86_64.rpm or oracle-database-free-23ai-1.0-1.el9.x86_64.rpm RPM file required for performing an RPM-based installation to a directory of your choice.

  5. Install the database software.

    For Oracle Linux 8 and Red Hat Enterprise Linux 8

    dnf -y install oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

    For Oracle Linux 9 and Red Hat Enterprise Linux 9

    dnf -y install oracle-database-free-23ai-1.0-1.el9.x86_64.rpm

Note:

Review the RPM log files to determine the system configuration changes. For example, review /var/log/oracle-database-preinstall-23ai/results/orakernel.log.

The installation of the Oracle Database software is now complete.

Creating and Configuring an Oracle Database

The configuration script creates a container database (FREE) with one pluggable database (FREEPDB1) and configures the listener at the default port (1521).

You can modify the configuration parameters by editing the /etc/sysconfig/oracle-free–23ai.conf file.

The parameters set in this file are explained in detail in the silent mode installation procedure: Performing a Silent Installation.

To create the database with the default settings:

  1. Log in as root using sudo.

    sudo -s
  2. Run the service configuration script:

    /etc/init.d/oracle-free-23ai configure

    At the command prompt, specify a password for the SYS, SYSTEM, and PDBADMIN administrative user accounts. Oracle recommends that your password should be at least 8 characters in length, contain at least 1 upper case character, 1 lower case character and, 1 digit [0-9].

    See Also:

    The same password will be used for these accounts. The password should conform to the Oracle recommended standards. See Oracle Database Security Guide for more information about guidelines for securing passwords

    After the configuration completes, the database and listener are started.

Table 4-1 Configuration, Database Files and Logs Location

File Name and Location Purpose

/opt/oracle

Oracle base. This is the root of the Oracle Database Free directory tree.

/opt/oracle/product/23ai/dbhomeFree

Oracle home. This home is where the Oracle Database Free is installed. It contains the directories of the Oracle Database Free executables and network files.

/opt/oracle/oradata/FREE

Database files.

/opt/oracle/diag subdirectories

Diagnostic logs. The database alert log is /opt/oracle/diag/rdbms/free/FREE/trace/alert_FREE.log

/opt/oracle/cfgtoollogs/dbca/FREE

Database creation logs. The FREE.log file contains the results of the database creation script execution.

/etc/sysconfig/oracle-free-23ai.conf

Configuration default parameters.

/etc/init.d/oracle-free-23ai

Configuration and services script.

Note:

If a host does not have any IP address other than loop back address assigned (typically in a docker or in an another container environment), Oracle Net Configuration Assistant (Oracle NETCA) may fail during the installation with the error No valid IP Address returned for the host hostname in netca trace log. Please assign an IP address and retry the installation.

Performing a Silent Installation

You can install Oracle Database Free using silent mode. You can use this mode to perform an embedded install of Oracle Database Free with your application, or unattended operation.

To perform a silent installation, you must enter a password for the administrative accounts as a parameter to the script, or specify it in the configuration file.

  1. Create a wrapper shell script to perform the silent installation. The script should contain commands similar to the following:

    For Oracle Linux 8

    #!/bin/bash
     
    yum -y install /downloads/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm > /free_logs/FREEsilentinstall.log 2>&1
    
    /etc/init.d/oracle-free-23ai configure >> /free_logs/FREEsilentinstall.log 2>&1
    

    For Oracle Linux 9

    #!/bin/bash
     
    yum -y install /downloads/oracle-database-free-23ai-1.0-1.el9.x86_64.rpm > /free_logs/FREEsilentinstall.log 2>&1
    
    /etc/init.d/oracle-free-23ai configure >> /free_logs/FREEsilentinstall.log 2>&1
    

    Alternatively, you can enter the password in the script, such as:

    (echo "password"; echo "password";) | /etc/init.d/oracle-free-23ai configure >> /free_logs/FREEsilentinstall.log 2>&1

    Replace password with a password that is secure. The password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character, and 1 digit [0-9].

  2. Make the wrapper script executable.

    chmod +x myscript.sh
  3. Run the script as root using sudo.
    sudo ./myscript.sh

    The Oracle Database free Oracle home is /opt/oracle/product/23ai/dbhomeFREE

    For details of the installation, review the /free_logs/FREEsilentinstall.log file.

The database is configured with the default settings. It is not necessary to modify these parameters unless you have specific requirements. Make a copy of the configuration file /etc/sysconfig/oracle-free-23ai.conf before modifying it. Make your modifications after the RPM install and before configuring the database.

The /etc/sysconfig/oracle-free-23ai.conf configuration file sets the following:

  • LISTENER_PORT: A valid listener numeric port value for the database listener. Do not specify any value for automatic port assignment.

  • CHARSET: Character set of the database. This is set to AL32UTF8.

  • DBFILE_DEST Database file directory. By default, the database files are stored in the Oracle base /opt/oracle/oradata subdirectory. You can also create your own database file directory. However, the permissions for this file path should be owned by the oracle user.

  • SKIP_VALIDATIONS: Skip validation for memory and disk space. Default is false.

  • CONFIGURE_TDE: Set CONFIGURE_TDE=true to configure TDE. The default value is false.
  • ENCRYPT_TABLESPACES: Leave this value empty for user tablespace alone. Set this value to ALL for encrypting all the tablespaces. For specific tablespaces use SYSTEM:true,SYSAUX:false.s

Caution:

When you modify and save a file containing the plain text password, provide the ownership of the file only to the Oracle software installation owner (oracle) user. Change the permissions on the file to 600. Oracle recommends that database administrators or other administrators delete or secure such files containing plain text passwords when they are not in use.

Note:

The password should conform to the Oracle recommended standards. See Oracle Database Security Guide for more information about guidelines for securing passwords

The database creation logs are located under Oracle base in the /opt/oracle/cfgtoollogs/dbca/ subdirectory.

Setting Oracle Database Free Environment Variables

After you install and configure Oracle Database Free, set the environment before you use Oracle Database Free.

Use the oraenv and coraenv scripts to set your environment variables.

For example, to set your environment variables in Bourne, Bash, or Korn shell without being prompted by the script, log in as the Oracle user and run the following commands:

export ORACLE_SID=FREE 
export ORAENV_ASK=NO 
. /opt/oracle/product/23ai/dbhomeFree/bin/oraenv
ORACLE_HOME = [] ? /opt/oracle/product/23ai/dbhomeFree
The Oracle base has been set to /opt/oracle
For C shell:
setenv ORACLE_SID FREE
setenv ORACLEENV_ASK NO
source /opt/oracle/product/23ai/dbhomeFree/bin/coraenv