5.2 Performing a Silent Installation

You can install Oracle Express Edition using the silent mode. This mode can be used for embedded install of XE (with your application) or unattended operation.

To perform a silent installation, a password for the administrative accounts must be provided as a parameter to the script, or specified in the configuration file.

  1. Create a wrapper shell script to perform the silent installation.

    It should contain commands similar to the following:

    #!/bin/bash
     
    yum -y localinstall /downloads/oracle-database-xe–18c-1.0-1.x86_64.rpm > /xe_logs/XEsilentinstall.log 2>&1
    
    /etc/init.d/oracle-xe-18c configure >> /xe_logs/XEsilentinstall.log 2>&1
    

    Alternatively, you can pass on the password in the script, such as:

    (echo "password"; echo "password";) | /etc/init.d/oracle-xe-18c configure >> /xe_logs/XEsilentinstall.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 as root using sudo.
    sudo ./myscript.sh

    XE Oracle Home is /opt/oracle/product/18c/dbhomeXE .

    For details of the installation, review the /xe_logs/XEsilentinstall.log file.

The XE database is configured with 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-xe-18c.conf before modifying it. Make your modifications after the RPM install and before configuring the database.

The provided configuration file /etc/sysconfig/oracle-xe-18c.conf sets the following:

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

  • EM_EXPRESS_PORT: A valid port numeric value for Oracle Enterprise Manager (EM) Express listener. This is set to port 5500.

  • 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/oradata subdirectory.

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

  • ORACLE_PASSWORD: The password for the administrative accounts.

Caution:

When you modify and save a file containing plain text password, ownership of the file should be given to the Oracle software installation owner only, and permissions on the file should be changed to 600. Oracle strongly 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

You can find the database creation logs under the Oracle Base /opt/oracle/cfgtoollogs/dbca/ subdirectory.

See Also:

Configuration, Database Files and Logs Location for a summary of important files and their locations