Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)

This article presents how to install Oracle 11G on Oracle Enterprise Linux 7 (OEL7).

Read following article how to install Oracle Enterprise Linux 7: Install Oracle Linux 7 (OEL7) (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Installation software is available on OTN version 11.2.0.1 or metalink 11.2.0.4. In this installation I’m presenting installation for 11.2.0.4 but for previous version 11.2.0.X it shouldn’t be different.

Oracle software which I verified

release 11.2.0.4

p13390677_112040_Linux-x86-64_1of7.zip 
p13390677_112040_Linux-x86-64_2of7.zip

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

Add groups

--required groups
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
Add user Oracle
/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle

Change password for user

passwd oracle
Add kernel parameters to /etc/sysctl.conf
kernel.shmmni = 4096 
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

Apply kernel parameters

/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle   soft   nproc    131072
oracle   hard   nproc    131072
oracle   soft   nofile   131072
oracle   hard   nofile   131072
oracle   soft   core     unlimited
oracle   hard   core     unlimited
oracle   soft   memlock  50000000
oracle   hard   memlock  50000000

The “/etc/hosts” file must contain a fully qualified name for the server.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example.

127.0.0.1 oel7 oel7.dbaora.com localhost localhost.localdomain

Modify .bash_profile for user oracle in his home directory

# Oracle Settings
export TMP=/tmp

export ORACLE_HOSTNAME=oel7.dbaora.com
export ORACLE_UNQNAME=ORA11G
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ORA11G

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022

Check which packages are installed and which are missing

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel

In my case it returns following

binutils-2.23.52.0.1-12.el7(x86_64)
elfutils-libelf-0.157-2.el7(x86_64)
package elfutils-libelf-devel is not installed
gcc-4.8.2-3.el7(x86_64)
gcc-c++-4.8.2-3.el7(x86_64)
glibc-2.17-36.el7(x86_64)
glibc-common-2.17-36.el7(x86_64)
glibc-devel-2.17-36.el7(x86_64)
glibc-headers-2.17-36.el7(x86_64)
package ksh is not installed
libaio-0.3.109-9.el7(x86_64)
package libaio-devel is not installed
libgcc-4.8.2-3.el7(x86_64)
libstdc++-4.8.2-3.el7(x86_64)
libstdc++-devel-4.8.2-3.el7(x86_64)
make-3.82-19.el7(x86_64)
sysstat-10.1.5-1.el7(x86_64)
package unixODBC is not installed
package unixODBC-devel is not installed

There are two options to install missing packages

  • You need to install missing from dvd. Just mount it and install missing packages using rpm -Uvh command from directory <mount dvd>/Packages.

NOTE – I’m using x86_64 version of packages

rpm -Uvh elfutils-libelf-devel*.x86_64.rpm
rpm -Uvh libaio-devel*.x86_64.rpm
rpm -Uvh unixODBC*.x86_64.rpm
rpm -Uvh ksh*.x86_64.rpm
  • Run yum install command for missing packages
--example howto install many packages
yum install elfutils-libelf-devel \
ksh \
libaio-devel \
unixODBC*

Create directory structure for database software

  • ORACLE_BASE – /ora01/app/oracle
  • ORACLE_HOME – /ora01/app/oracle/product/11.2.0/db_1
mkdir -p /ora01/app/oracle/product/11.2.0/db_1
chown oracle:oinstall -R /ora01

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows. It requires REBOOT to be effective !!!

SELINUX=permissive

In Oracle Enterprise Linux 7 /tmp data is stored on tmpfs which consumes memory and is too small. To revert it back to storage just run following command and REBOOT machine to be effective.

systemctl mask tmp.mount

Install database software

Let’s start with database software installation as oracle user.

su - oracle

--unzip software 11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
--I defined 4 aliases in .bash_profile of user oracle to make 
--administration heaven :)

[oracle@oel7 ~]$ alias envo cdob cdoh tns
alias envo='env | grep ORACLE'
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'

--run alias command envo to display environment settings
envo
ORACLE_UNQNAME=ORA11G
ORACLE_SID=ORA11G
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOSTNAME=oel7.dbaora.com
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1

--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME 
[oracle@oel7 ~]$ cdob
[oracle@oel7 oracle]$ pwd
/ora01/app/oracle

[oracle@oel7 db_1]$ cdoh
[oracle@oel7 db_1]$ pwd
/ora01/app/oracle/product/11.2.0/db_1

--run installation
./runInstall

1. Uncheck checkbox “I wish to receive security updates via My Oracle Support” and then click “Next” button.

2. Ignore following message and click “Yes” button.

3. Select “Skip software updates” and click “Next” button.

4. Select “Create and configure a database” then click “Next” button.

5. Select “Server Class” then click “Next” button.

6. Select “Single instance database installation” and click “Next” button.

7. Select “Typical Install” and click “Next” button.

8. Enter database name, administration password for user and click “Next” button.

9. Just click “Next” button.

10. Check checkbox “Ignore All” to ignore this error. Then click “Next” button.

dbs_oel7_11g_1

11. Just click “Yes” button to continue with installation.

12. Summary screen just before installation. Click “Install” button.

13. Boring installation …

14. I received following error during linking binaries

dbs_oel7_11g_2

To fix this error edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, search for the line

 $(MK_EMAGENT_NMECTL)

and replace the line with

$(MK_EMAGENT_NMECTL) -lnnz11

then click “Retry” button

15. Database Configuration will start and create database for you.

16. You should see summary screen for your new database. Click “OK” button to continue with installation.

dbs_oel7_11g_3

17. In the “middle” of installation you will be asked to run 2 scripts as user root. when scripts are executed just click “OK” button. Installation will proceed.

--execute scripts
/ora01/app/oraInventory/orainstRoot.sh
/ora01/app/oracle/product/11.2.0/db_1/root.sh

18. Installation completed. Just click “Close” button.

dbs_oel7_11g_4

Post installation steps

Edit the “/etc/oratab” file to set restart flag for ORA11G to ‘Y’.

ORA11G:/u01/app/oracle/product/11.2.0/db_1:Y

Have a fun 🙂

Tomasz

23 thoughts on “Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)

  1. Thank you Thank you Thank you!!!!
    Thank you Thank you Thank you!!!!
    Thank you Thank you Thank you!!!!
    Thank you Thank you Thank you!!!!
    Thank you Thank you Thank you!!!!

    Pure instructions, to the point to get the job done. all commands are perfect!

    Thank you Thank you Thank you!!!!

  2. I am getting the following error. Any advice on how to correct this?

    Error in invoking target ‘install’ of makefile ‘/ora01/app/oracle/product/11.2.0/db_1/ctx/lib/ins_ctx.mk’. See ‘/ora01/app/oraInventory/logs/installActions2014-11-17_05-52-26AM.log’ for details.

      • It happens on machines with new glibc. Static liniking fixed problem for me:
        in ctx/lib/ins_ctx.mk

        ctxhx: $(CTXHXOBJ)
        -static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a

        Tak czy siak, fajna strona Lesio 😉

  3. For the sake of “ultra correctness”, should be

    net.core.wmem_max = 1048576

    instead of

    net.core.wmem_max = 1048586

    I suppose you meant 1M, but giving more memory to send buffers certainly won’t hurt 😉

  4. Issues faced with oracle 11.2.0.4 on RHEL 7
    ===================================
    Hi Guys,

    Since you people had done the Installation on OL7/RHEL 7.

    Can you please tell me did u faced any issues or any changes after or during the installation. Did you people find any performance issues/bugs.

    We have an new build project, So just want to know can i recommended the 11.2.0.4 on RHEL 7(because in future i may need to upgrade db to 12C).

    Regards,
    Preethi

  5. Amazing Tutorial … I had the same error in ins_ctx.mk using the 11.2.0.4, but the solution of krzysiek works perfectly.

    Thank you all for the sharing the valuable information.

    Best regards,

  6. I have this problem
    Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<

    On user oracle i put export DISPLAY=my_ip:0.0
    but i still have this problem.
    Is there any extra package i need to install.
    This is a basic RedHat install with only the packages u said i have to install.

  7. please help!!!!!
    whenever i try to run the installer and click on next, the message does not show up correctly the screen fails to load up.
    there is just a small line like thing and i cannot do anything further. my installation is just halted.
    how do i get the gui to show up

    • Hi, I faced the same problem where my installer ‘hangs’ with the appearance of a small line.

      I tried to install the db four times and was stuck by the same problem at the “Install product ” step. The 5th time, out of frustration I pressed “Enter” on my keyboard and was surprised to see the installation proceed.

      Then I figured out what the line is.

      Actually, it is a display problem. That small line is a minimized dialog box. Move your mouse directly on top of the line and the mouse pointer will change to a window resize icon. You can then resize the dialog box and proceed accordingly. I realized this after clicking the “Details” button on the “Install product” window, which popped up the small line again and as I moved my mouse over, the mouse pointer change and I resized the window.

      Clicking enter upon appearance of the small line (minimized dialog box) will execute the default action which in most of the cases is “Continue”. That is why after hitting “Enter” out of frustration the first time, my installation proceeded.

      I’m using OL 7.2 with KDE install.

  8. Friends !! I have another problem, I have tried to install OEL 7.2 using VMware 11 several times but when progress reaches at 68 % while linking TEXT BINARIES the installer window fades-out ( it looks like inactive) & still remain in the same state for several hours. What is this? No error message appears, No warning, nothing like this. I have tried the installation for more than 8 times but the same problem.

  9. To fix popup “…” bug durring installation please use KDE instead of default Gnome.
    yum groupinstall “KDE Desktop”

    Installation works fine but after system restart database and services are down and can’t be started up (IDLE INSTANCE).
    ERROR:ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Looks like some var issues but I double checked everything. Any ideas?

  10. Thank you very much, the article is perfect ! I had troubles at first with the newly installed database but it was because I was using the 11.2.0.1

  11. I am having the following Error:
    “Error in invoking target ‘install’ of makefile ‘/ora11g/app/oracle/product/12.1.0/db_1/ctx/lib/ins_ctx.mk’. See ‘/ora11g/app/oraInventory/logs/installActions2018-02-14_10-38-24PM.log’ for details.”

    How to Fix this issue. Please let me know.

  12. errors invoking *all .mk files* i have installed all packages. and have done all steps 5 time. but can’t solve this problem.Can anyone help me or faced this problem?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.