Oracle Database 18c Express Edition (XE) RPM Installation On Oracle Linux 6 (OEL6) and 7 (OEL7)
This article describes the Oracle Database 18c Express Edition (XE) RPM installation on Oracle Linux 6 (OL6) and 7 (OL7) 64-bit. The article is based on a server installation with a minimum of 2G swap and secure Linux set to permissive.
Oracle Installation
Download the “oracle-database-xe-18c-1.0-1.x86_64.rpm” RPM file from the Express Edition (XE) download page here.
With the RPM file downloaded, you can install the Oracle prerequisites and software using the following command as the “root” user. It automatically pulls down all dependencies, including the “oracle-database-preinstall-18c” package. If you do this the “oracle” user doesn’t have a home directory created, so I install the preinstall package first, so the “oracle” user is as I expect it. The additional command is included below, but commented out.
#yum install -y oracle-database-preinstall-18c yum -y localinstall oracle-database-xe-18c-1.0-1.x86_64.rpm
On RHEL you will meed to manually get the prerequisites RPM from the Yum repository and run it manually before installing the database RPM.
# RHEL7 curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm rm oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm # RHEL6 curl -o oracle-database-preinstall-18c-1.0-1.el6.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el6.x86_64.rpm yum -y localinstall oracle-database-preinstall-18c-1.0-1.el6.x86_64.rpm rm oracle-database-preinstall-18c-1.0-1.el6.x86_64.rpm
Create Database
You can do some minor configuration by editing the “/etc/sysconfig/oracle-xe-18c.conf” file before before continuing, but you don’t need to.
Running the following script creates a database called “XE”, with a pluggable database (PDB) called “XEPDB1”. You have to specify a password, which is used for the SYS, SYSTEM and PDBADMIN users.
[root@ora18c ~]# /etc/init.d/oracle-xe-18c configure Specify a password to be used for database accounts. Oracle recommends that 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]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts: Confirm the password: Configuring Oracle Listener. Listener configuration succeeded. Configuring Oracle Database XE. Enter SYS user password: ************** Enter SYSTEM user password: ************** Enter PDBADMIN User Password: ************ Prepare for db operation 7% complete Copying database files 29% complete Creating and starting Oracle instance 30% complete 31% complete 34% complete 38% complete 41% complete 43% complete Completing Database Creation 47% complete 50% complete Creating Pluggable Databases 54% complete 71% complete Executing Post Configuration Actions 93% complete Running Custom Scripts 100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/XE. Database Information: Global Database Name:XE System Identifier(SID):XE Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details. Connect to Oracle Database using one of the connect strings: Pluggable database: ora18c.localdomain/XEPDB1 Multitenant container database: ora18c.localdomain Use https://ora18c:5500/em to access Oracle Enterprise Manager for Oracle Database XE [root@ora18c ~]#
Auto-Start
On Oracle Linux 7 you can configure the database to auto-start using the following commands from the “root” user.
systemctl start oracle-xe-18c systemctl enable oracle-xe-18c
For Oracle Linux 6 you can use the following commands.
service oracle-xe-18c start chkconfig oracle-xe-18c on