4 Installing Oracle Database Free
Learn how to 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.
/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/opt/oracle
.
- Installing Oracle Database Free RPM for Linux x86-64
- Installing Oracle Database Free RPM on Linux for Arm (aarch64)
Installing Oracle Database Free RPM for Linux x86-64
-
Log in as the
root
user. -
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
-
Go to the Oracle
yum
site:https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/
-
Download the latest 23ai Oracle Database Preinstallation RPM. For example,
oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm
-
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
-
Go to the Oracle
yum
site:https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/
-
Download the latest 23ai Oracle Database Preinstallation RPM. For example,
oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm
-
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.
- Review the RPM log files to determine the system configuration changes. For example, review
/var/log/oracle-database-preinstall-23ai/results/orakernel.log
. - Use the
-y
option if you wantdnf
to skip the package confirmation prompt. - See About DNF for more information about the
dnf
command.
-
-
Access the Oracle Database Free software download page:
https://www.oracle.com/database/technologies/free-downloads.html
-
Download the
oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
ororacle-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. -
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
The installation of the Oracle Database software is now complete.
Installing Oracle Database Free RPM on Linux for Arm (aarch64)
-
Log in as the
root
user. -
Install the Oracle Database Preinstallation RPM.
Oracle Linux 8
dnf -y install oracle-database-preinstall-23ai
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.
- Review the RPM log files to determine the system configuration changes. For example, review
/var/log/oracle-database-preinstall-23ai/results/orakernel.log
. - Use the
-y
option if you wantdnf
to skip the package confirmation prompt. - See About DNF for more information about the
dnf
command.
-
Access the Oracle Database Free software download page:
https://www.oracle.com/database/technologies/free-downloads.html
-
Download the
oracle-database-free-23ai-1.0-1.el8.aarch64.rpm
RPM file required for performing an RPM-based installation to a directory of your choice. -
Install the database software.
For Oracle Linux 8
dnf -y install oracle-database-free-23ai-1.0-1.el8.aarch64.rpm
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.
To create the database with the default settings:
-
Log in as
root
usingsudo
.sudo -s
-
Run the service configuration script:
/etc/init.d/oracle-free-23ai configure
At the command prompt, specify a password for the
SYS
,SYSTEM
, andPDBADMIN
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 passwordsAfter the configuration completes, the database and listener are started.
Table 4-1 Configuration, Database Files and Logs Location
File Name and Location | Purpose |
---|---|
|
Oracle base. This is the root of the Oracle Database Free directory tree. |
|
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. |
|
Database files. |
|
Diagnostic logs. The database alert log is |
|
Database creation logs. The |
|
Configuration default parameters. |
|
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 errorNo valid IP Address returned for the host hostname in netca trace log.
Please assign an IP address and retry the configuration.
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.
Note:
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.
-
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
For Oracle Linux 8 on Linux for Arm (aarch64)
#!/bin/bash yum -y install /downloads/oracle-database-free-23ai-1.0-1.el8.aarch64.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].
-
Make the wrapper script executable.
chmod +x myscript.sh
- Run the script as
root
usingsudo
.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 /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 toAL32UTF8
. -
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 theoracle
user. -
SKIP_VALIDATIONS
: Skip validation for memory and disk space. Default isfalse
. CONFIGURE_TDE
: SetCONFIGURE_TDE=true
to configure Transparent Data Encryption (TDE). The default value isfalse
.ENCRYPT_TABLESPACES
: Leave this value empty for user tablespaces. Set this value toALL
for encrypting all the tablespaces. For specific tablespaces, useSYSTEM:true,SYSAUX:false
. Default value is empty.
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 passwordsThe 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
These commands display an output similar to the following:
ORACLE_HOME = [] ? /opt/oracle/product/23ai/dbhomeFree
The Oracle base has been set to /opt/oracle
setenv ORACLE_SID FREE setenv ORACLEENV_ASK NO source /opt/oracle/product/23ai/dbhomeFree/bin/coraenv