Install Oracle 11G Release 2 (11.2) on Centos Linux 7
2014-06-13 from--

This article presents how to install Oracle 11G on Centos Linux 7.

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

Installation software is available on OTN, edelivery version or Oracle support(old metalink) In this installation I’m presenting installation for but for previous version 11.2.0.X it shouldn’t be different.

Database software –

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. centos7 localhost localhost.localdomain

Verify your network settings

[root@centos7 ~]# ping -c 1 centos7
PING centos7 ( 56(84) bytes of data.
64 bytes from centos7 ( icmp_seq=1 ttl=64 time=0.040 ms

--- centos7 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.040/0.040/0.040/0.000 ms

Modify .bash_profile for user oracle in his home directory

# Oracle Settings
export TMP=/tmp

export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1


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 \

In my case it returns following

package elfutils-libelf-devel is not installed
package ksh is not installed
package libaio-devel is not installed
package unixODBC is not installed
package unixODBC-devel is not installed

Missing packages are on Centos 7 installation dvd. Other option if you are connected to internet is just use yum install command.

  • First option – just mount dvd and install missing packages using rpm -Uvh command from directory <mount dvd>/Packages.

In my case the directory is

/run/media/tomasz/CentOS 7 x86_64/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
  • Second option – use yum install command
yum -y install elfutils-libelf-devel
yum -y install libaio-devel
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install ksh

Create directory structure

mkdir -p /ora01/app
chown oracle:oinstall /ora01/app
chmod 775 /ora01/app

create ORACLE_BASE directory for oracle

mkdir -p /ora01/app/oracle
chown oracle:oinstall /ora01/app/oracle
chmod 775 /ora01/app/oracle

Create ORACLE_HOME directory for oracle

mkdir -p /ora01/app/oracle/product/11.2.0/db_1
chown oracle:oinstall -R /ora01/app/oracle

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 !!!


In Centos 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
--I defined 4 aliases in .bash_profile of user oracle to make 
--administration heaven :)

[oracle@centos7 ~]$ 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

--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME 
[oracle@centos7 ~]$ cdob
[oracle@centos7 oracle]$ pwd

[oracle@centos7 db_1]$ cdoh
[oracle@centos7 db_1]$ pwd

--run installation from install directory

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.


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


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


and replace the line with


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.


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

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


19.You should see all details about new database in database console


Post installation steps

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


Useful commands

All commands should be executed as user oracle

  • check status, start, stop dbconsole
emctl status dbconsole
emctl start dbconsole
emctl stop dbconsole
  • check status, start, stop listener
lsnrctl status LISTENER
lsnrctl start LISTENER
lsnrctl stop LISTENER

Have a fun 🙂