Oracle Database 12c Release 1 (12.1) Installation on Oracle Linux 8 (OL8)
Introduction
This article provides a complete, step-by-step guide for installing Oracle Database 12c Release 1 (12.1) 64-bit on Oracle Linux 8 (OL8) 64-bit. The guide covers everything from downloading the software to creating a database and performing post-installation tasks.
The installation is based on a server configuration with a minimum of 2 GB swap space and secure Linux set to permissive. This guide assumes a basic familiarity with Linux command-line operations.
Note: Oracle Database 12.1 is not officially certified on Oracle Linux 8. However, by faking the OS version using the
CV_ASSUME_DISTIDenvironment variable, the installation can be made to work. For production environments, always use a certified combination of Oracle Database and Oracle Linux.
Overview of the Installation Process
| # | Phase | Description |
|---|---|---|
| 1 | Download Software | Obtain the Oracle 12.1 installation media |
| 2 | Unpack Files | Extract the installation files |
| 3 | Hosts File | Configure the server's hostname |
| 4 | Oracle Installation Prerequisites | Automatic or manual setup |
| 5 | Additional Setup | Steps required for all installations |
| 6 | Installation | Run the Oracle Universal Installer (OUI) |
| 7 | Database Creation | Create a database using DBCA |
| 8 | Post Installation | Configure automatic startup |
Phase 1: Download Software
Download the Oracle Database 12c Release 1 (12.1.0.2) software from one of the following sources:
| Source | Description |
|---|---|
| OTN | Oracle Technology Network — Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit) |
| eDelivery | Oracle Software Delivery Cloud — Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit) |
Note: Access to OTN is free, but access to eDelivery may require a support contract.
Phase 2: Unpack Files
Unzip the downloaded files:
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zipResult: You should now have a single directory called
databasecontaining the installation files.
Phase 3: Configure the Hosts File
The /etc/hosts file must contain a fully qualified name for the server.
Format:
<IP-address> <fully-qualified-machine-name> <machine-name>Example:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.0.215 ol8.localdomain ol8Set the hostname in /etc/hostname:
ol8.localdomainImportant: The hostname must be resolvable both forward and backward. Verify with
hostnameandping ol8.localdomain.
Phase 4: Oracle Installation Prerequisites
You can perform the prerequisites either automatically (using a preinstall package) or manually.
Option A: Automatic Setup
At the time of writing, there is no preinstall package for 12.1, but the 19c preinstall package can be used:
# Install the preinstall package
yum install -y oracle-database-preinstall-19c
# Perform a full system update
yum update -yTip: It is worth running all the YUM commands listed in the manual setup section as well, since some additional packages may be needed depending on your OS package groups.
Option B: Manual Setup
If you have not used the preinstall package, perform the following steps manually.
Step 1: Configure Kernel Parameters
Add the following lines to /etc/sysctl.conf (or create a file called /etc/sysctl.d/98-oracle.conf):
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500Apply the changes:
/sbin/sysctl -p
# Or
/sbin/sysctl -p /etc/sysctl.d/98-oracle.confStep 2: Configure User Limits
Create a file called /etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf with the following content:
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728Step 3: Install Required Packages
Install the required packages, including the 32-bit versions where applicable:
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install zlib-devel.i686 -yStep 4: Create Groups and Users
Create the required groups and users:
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
useradd -u 54321 -g oinstall -G dba,oper oracleNote: Uncomment the extra groups you require (e.g.,
backupdba,dgdba,kmdbafor advanced features).
Phase 5: Additional Setup
The following steps are required regardless of whether you performed the manual or automatic setup.
Step 1: Set the Oracle User Password
passwd oracleStep 2: Set SELinux to Permissive
Edit /etc/selinux/config and set:
SELINUX=permissiveApply the change:
# setenforce PermissiveNote: Alternatively, restart the server for the change to take effect.
Step 3: Disable the Firewall
# systemctl stop firewalld
# systemctl disable firewalldNote: In production environments, configure the firewall to allow Oracle ports instead of disabling it entirely.
Step 4: Create Oracle Directories
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01Important: Mount points should ideally be separate disks rather than directories under
/. Putting mount points directly under root is done here for simplicity, but for a real installation,/storage should be reserved for the OS.
Step 5: Configure X11 Access (If Using GUI)
If you are not working from the console or using SSH tunnelling, log in as root and issue:
xhost +<machine-name>Step 6: Create Environment Scripts
Create a scripts directory:
mkdir /home/oracle/scriptsCreate setEnv.sh:
cat > /home/oracle/scripts/setEnv.sh <<EOF
# Oracle Settings
export TMP=/tmp
export TMPDIR=\$TMP
export ORACLE_HOSTNAME=ol8-121.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/12.1.0.2/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=cdb1
export PDB_NAME=pdb1
export DATA_DIR=/u02/oradata
export PATH=/usr/sbin:/usr/local/bin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
EOFNote: The
$characters are escaped using\because the script is created using thecatcommand. If you create the file manually, remove the escape characters.
Add a reference to .bash_profile:
echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profileCreate start_all.sh and stop_all.sh:
cat > /home/oracle/scripts/start_all.sh <<EOF
#!/bin/bash
. /home/oracle/scripts/setEnv.sh
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbstart \$ORACLE_HOME
EOF
cat > /home/oracle/scripts/stop_all.sh <<EOF
#!/bin/bash
. /home/oracle/scripts/setEnv.sh
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbshut \$ORACLE_HOME
EOF
chown -R oracle:oinstall /home/oracle/scripts
chmod u+x /home/oracle/scripts/*.shResult: Once the installation is complete and
/etc/oratabis edited, you can start/stop the database with:~/scripts/start_all.sh ~/scripts/stop_all.sh
Phase 6: Installation
Step 1: Log In as Oracle User
su - oracleIf using X emulation, set the DISPLAY variable:
DISPLAY=<machine-name>:0.0; export DISPLAYStep 2: Unzip the Installation Media
cd /u01/software
unzip -oq "linuxamd64_12102_database_*of2.zip"Step 3: Fake the OS Version
export CV_ASSUME_DISTID=OEL7.6Important: This step is required because Oracle Database 12.1 is not certified on Oracle Linux 8. The
CV_ASSUME_DISTIDenvironment variable tricks the installer into thinking it's running on Oracle Linux 7.6.
Step 4: Run the Installer
Interactive Mode (GUI):
./runInstallerSilent Mode:
./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile ${ORACLE_HOME}/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=${ORA_INVENTORY} \
SELECTED_LANGUAGES=en,en_GB \
ORACLE_HOME=${ORACLE_HOME} \
ORACLE_BASE=${ORACLE_BASE} \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=trueStep 5: Run the Root Scripts
When prompted, run the following scripts as root:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/12.1.0.2/dbhome_1/root.shNote: The exact paths may vary depending on your
ORACLE_HOMEand inventory location.
Tip: It's better to patch the installation first if you have access to Oracle Support before creating the database.
Phase 7: Database Creation
Create a database using the Database Configuration Assistant (DBCA).
Step 1: Start the Listener
lsnrctl startStep 2: Run DBCA
Interactive Mode (GUI):
dbcaSilent Mode:
dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname ${ORACLE_SID} -sid ${ORACLE_SID} -responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword SysPassword1 \
-systemPassword SysPassword1 \
-createAsContainerDatabase true \
-numberOfPDBs 1 \
-pdbName ${PDB_NAME} \
-pdbAdminPassword PdbPassword1 \
-databaseType MULTIPURPOSE \
-memoryMgmtType auto_sga \
-totalMemory 2000 \
-storageType FS \
-datafileDestination "${DATA_DIR}" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqsNote: Replace
SysPassword1andPdbPassword1with secure passwords of your choice. The-totalMemory 2000parameter sets the total memory to 2 GB; adjust based on your server's resources.
Phase 8: Post Installation
Edit the /etc/oratab file and set the restart flag for each instance to Y:
cdb1:/u01/app/oracle/product/12.1.0.2/db_1:YPurpose: The
Yflag enables automatic startup of the database when the server boots, using thedbstartutility.
The Complete Installation Flow
┌─────────────────────────────────────────────────────────────────┐
│ 1. DOWNLOAD SOFTWARE │
│ Oracle Database 12c Release 1 (12.1.0.2) 64-bit │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 2. UNPACK FILES │
│ unzip linuxamd64_12102_database_1of2.zip │
│ unzip linuxamd64_12102_database_2of2.zip │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 3. HOSTS FILE │
│ Configure /etc/hosts and /etc/hostname │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 4. PREREQUISITES │
│ Automatic: yum install oracle-database-preinstall-19c │
│ Manual: sysctl, limits, packages, groups, users │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 5. ADDITIONAL SETUP │
│ Password, SELinux, firewall, directories, scripts │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 6. INSTALLATION │
│ export CV_ASSUME_DISTID=OEL7.6 │
│ ./runInstaller (interactive or silent) │
│ Run root scripts │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 7. DATABASE CREATION │
│ lsnrctl start │
│ dbca (interactive or silent) │
└──────────────────────────┬──────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 8. POST INSTALLATION │
│ Edit /etc/oratab and set the restart flag to Y │
└─────────────────────────────────────────────────────────────────┘Key Configuration Files
| File | Purpose |
|---|---|
/etc/hosts | Hostname resolution |
/etc/hostname | Server hostname |
/etc/sysctl.conf | Kernel parameters |
/etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf | User limits |
/etc/selinux/config | SELinux mode |
/home/oracle/scripts/setEnv.sh | Oracle environment variables |
/home/oracle/.bash_profile | Shell profile |
/etc/oratab | Database startup configuration |
Best Practices
| Practice | Description |
|---|---|
| Use Certified Combinations | For production, use certified OS and database versions |
| Use Separate Mount Points | Mount /u01, /u02, etc. on separate disks |
| Configure the Firewall | Instead of disabling, configure ports (1521, etc.) |
| Set Secure Passwords | Use strong passwords for SYS, SYSTEM, and PDB admin |
| Patch Before Creating DB | Apply the latest patches before creating the database |
| Use Silent Mode for Automation | Silent installs are ideal for scripting and automation |
| Test the Installation | Verify connectivity and basic operations after installation |
| Document Configuration | Keep a record of all parameters and settings |
Troubleshooting Common Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| Prerequisite check fails | Missing packages | Install required packages via yum |
| Installer won't start | DISPLAY not set | Set the DISPLAY variable or use silent mode |
| OS version not supported | Oracle Linux 8 not certified | Use CV_ASSUME_DISTID=OEL7.6 |
| Root script fails | Wrong permissions | Run as root and verify paths |
| DBCA fails | Listener not running | Start the listener with lsnrctl start |
| Database won't start | Wrong ORACLE_HOME | Verify environment variables |
| Memory errors | Insufficient memory | Increase server memory or reduce SGA |
| Firewall blocks connections | Firewall enabled | Configure or disable the firewall |
Summary
Installing Oracle Database 12c Release 1 (12.1) on Oracle Linux 8 involves the following key phases:
Download Software: Obtain the installation media from OTN or eDelivery
Unpack Files: Extract the installation files
Hosts File: Configure the server's hostname
Prerequisites: Install required packages, kernel parameters, and user limits
Additional Setup: Set passwords, SELinux, firewall, directories, and scripts
Installation: Run the Oracle Universal Installer (OUI) with
CV_ASSUME_DISTID=OEL7.6Database Creation: Use DBCA to create a container database with a PDB
Post Installation: Configure automatic startup via
/etc/oratab
Key Points to Remember
Oracle Database 12.1 is not certified on Oracle Linux 8 — use
CV_ASSUME_DISTID=OEL7.6to work around thisThe 19c preinstall package can be used to automate prerequisite setup
Kernel parameters and user limits must be configured for optimal performance
SELinux should be set to permissive during installation
The root scripts must be run after the installer completes
DBCA creates the database with a container (CDB) and pluggable database (PDB)
The
/etc/oratabfile controls automatic startup
Why This Matters
Proper installation and configuration of Oracle Database 12c is essential for:
Reliable Performance: Correct kernel parameters and user limits ensure optimal database performance
Security: Proper user/group setup and SELinux configuration protect the database
Manageability: Environment scripts and automatic startup simplify administration
Scalability: A well-configured database can handle growing workloads
Compatibility: Correct setup ensures compatibility with Oracle E-Business Suite and other applications
By following this guide, you can successfully install Oracle Database 12c Release 1 on Oracle Linux 8, providing a solid foundation for your Oracle applications.
References
Oracle Database Documentation: Database Installation Guide for Linux
Oracle Database Documentation: Database Administrator's Reference
My Oracle Support: Oracle Database 12c Release 1 Certification Matrix
Oracle Linux Documentation: Oracle Linux 8 Administrator's Guide
Related Articles: Oracle Universal Installations (OUI) Silent Installations, Database Configuration Assistant (DBCA): Creating Databases in Silent Mode
No comments:
Post a Comment