Install Oracle 11g R2 Database On Oracle Linux 7.7 with EM (Enterprise Manager)

Just go through these steps, you will have Oracle 11GR2 database up and running on Oracle Linux 7.7 with Enterprise Manager (EM)

Note on Oracle version support: Starting with Oracle Database 11g Release 2 (, Oracle Linux 6 and Red Hat Enterprise Linux 6 are supported on Linux x86 and Linux x86-64. … Starting with Oracle Database 11g Release 2 (, Oracle Linux 7 and Red Hat Enterprise Linux 7 are supported on Linux x86-64. (link here)

In this serries:

Step 1: Install basic packages

Run below command as root user:

sudo yum install -y wget net-tools telnet curl wget gcc htop ntpdate binutils  compat-libstdc++-33 compat-libstdc++-33.i686 gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 unixODBC unixODBC-devel zlib-devel elfutils-libelf-devel sysstat make && yum -y update 

Step 2: Download the Oracle database software

You have 2 options to download:

After finish downloading you will have 2 or more ZIP files. Unzip all of them to a single directory called database with unzip command.


Step 3: Edit Host file

Edit /etc/hosts file dg9.localdomain dg9

Edit /etc/hostname


Install Oracle Prerequisites

yum install -y oracle-rdbms-server-11gR2-preinstall && yum update

Check if the “/etc/sysctl.conf” file is something like this (the number may be differrent because we already run preinstall above. Just a check step:

fs.aio-max-nr = 1048576 
fs.file-max = 6815744 
kernel.shmall = 2097152 
kernel.shmmax = 536870912 
kernel.shmmni = 4096 
# semaphores: semmsl, semmns, semopm, semmni 
kernel.sem = 250 32000 100 128 
net.ipv4.ip_local_port_range = 9000 65500 

Step 4: Additional Setup

Edit /etc/selinux/config


Then run the command

setenforce Permissive

Stop and disable FirewallD

systemctl stop firewalld
systemctl disable firewalld

Create installation directory

mkdir -p /u01/app/oracle/product/
chown -R oracle:oinstall /u01
chmod -R 775 /u01

Add these lines into /home/oracle/.bash_profile

# Oracle Settings 
export TMP TMPDIR=$TMP; 
export TMPDIR ORACLE_HOSTNAME=dg9.localdomain; export ORACLE_HOSTNAME 
PATH=/usr/sbin:$PATH; export PATH 

Step 5: Start the installation

Install XMing and Putty configuration for Windows

If you are using Putty from Windows then first you need to install XMing – an X-Server that starts on top of your desktop. Download Xming and install it. Download PuTTY (if using Windows) and save it on your hard disk.

Related:  groovy.sql.Sql error calling firstRow with Oracle 10g

Start XMing as default.

Start PuTTY. In the PuTTY Configuration section, on the left panel, select Connection → SSH → X11. On the right panel, click on the Enable X11 forwarding checkbox. Set the X display location as :0.0. Enter the hostname or IP address in the Host Name textbox.

Now login as oracle user, run the installer. Please remember to run as oracle user and run the install file.

cd database

You’ll have your X-application runs on your Windows via X11 forwarding configure.

Step 6: Some important options while installing

Choose “Create and configure a database”

Choose “Server class”

Then “Single Instance database installation” as we’re not using RAC.

Choose “Advanced install”

Choose “Enterprise Edition” depends on your license. No image here means just press NEXT.

Fill db name and SID

It is a very important step. Please remember to use CAPITALIZED words as both 2 names = DG9 (in this case). Because your automatically created spfile will be spfile[SID].ora -> if you stay with uncapitalized words -> file not found at database startup -> need to specify spfile to load manually.

Related:  Stored Procedure Dynamic Order By

Your EM Configuration file will be:


Your spfile will be:

$ORACLE_HOME/dbs/spfile[captitalized SID]

Your OC4J configuration will be:

$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_[DB_UNIQUENAME]_[Capitalized SID]

So, CAPITALIZED both SID & DATABASE NAME + Set both equal to DG9 (same value)

Configure Memory

Character sets

Set the password

In the last window, you may need to choose Ignore all checkbox and press Next. In my experience, those library will not affect too much in the operation of the database. Press Finish and wait for Oracle database to be installed on the machine.

Step 7: Fixing some errors and finalize installation

Fix invoking “” error

While installing, you will receive some error like error while invoking then edit “$ORACLE_HOME/sysman/lib/” file, change




Fix invoking “ctx/lib/” error

If you get error while invoking “ctx/lib/“, create this file as root:

# Fix ctx/lib/
cat << __EOF__ > /tmp/memcpy_wrap.c
#include <stddef.h>
#include <string.h>
asm (".symver wrap_memcpy, memcpy@GLIBC_2.14");
void *wrap_memcpy(void *dest, const void *src, size_t n) {
return memcpy(dest, src, n);
if [[ -e "${ORACLE_HOME}/ctx/lib/" ]]; then
sed -i -e 's/\$(INSO_LINK)/\$(INSO_LINK) -Wl,--wrap=memcpy_wrap \$(ORACLE_HOME)\/ctx\/lib\/memcpy_wrap.o/g' ${ORACLE_HOME}/ctx/lib/
gcc -c /tmp/memcpy_wrap.c -o ${ORACLE_HOME}/ctx/lib/memcpy_wrap.o && rm /tmp/memcpy_wrap.c

Now run this sh file and press RETRY button.

Related:  Oracle: how to do full text searches on an XMLType?

Fix ORA-00845: MEMORY_TARGET not supported on this system

You need to reduce the MEMORY parameter setting.

Fix ORA-19502: write error on file “…” and ORA-27072: File I/O error

You need to free more space on disk. Not enough disk space left for Oracle install.

Run the script to finalize the install.

When the successful dialog appears, press Close button to finish.

Now you can access the EM control page from your browser.

You may need to ignore SSL certificate error on your browser.

You may check/restart/start/stop the EM with those commands:

emctl status dbconsole
emctl start dbconsole
emctl stop dbconsole

Step 8: Schedule Oracle database to start automatically after reboot

Edit the file “/etc/oratab” as follow: