Install Oracle 12C Release 1 (12.1) on Oracle Linux 6 (OEL6)

This article presents installation of Oracle database 12C(12.1) on OEL6. Read following article to install OEL6 Linux: Install Oracle Linux 6 64 bit(for comfort set 4G memory for your virtual machine). During OEL6 installation I drop user oracle and both group dba and oinstall. Software Software for 12CR1 is available on OTN or edelivery

Database software

Requirements Be sure you fulfil following:

  • Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6uek.x86_64 or later
  • Oracle Linux 6 with the Red Hat Compatible kernel: 2.6.32-71.el6.x86_64 or later

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

su - root

It’s recommended to update your OEL6 kernel to latest version as root

yum update

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

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

For example. oel6 localhost.localdomain localhost

Add groups

#groups for database management
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
Add user Oracle for database software
useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba oracle

Change password for user Oracle

passwd oracle

OS configuration Check which packages are installed and which are missing

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
libXext \
libXtst \
libX11 \
libXau \
libxcb \
libXi \
sysstat \
unixODBC \

Install missing packages. It’s just example:

#directory with mounted Oracle Enterprise Linux 6 install disk 

cd /media/<OEL6>/Server/Packages 

#install missed packages (example for package unixODBC*) 

rpm -Uvh unixODBC*
or if you have internet connection using yum command.It’s just example:
yum install ksh unixODBC libaio-devel
Add kernel parameters to /etc/sysctl.conf
--kernel parameters for 12gR1 installation

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

Apply kernel parameters

/sbin/sysctl -p

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

--shell limits for users oracle 12gR1

oracle   soft   nofile   1024
oracle   hard   nofile   65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

Add following line in the /etc/pam.d/login file, if it does not already exist

session required

Modify /etc/selinux/config and change flag SELINUX. Restart server after this change.


Disable firewall

service iptables stop
chkconfig iptables off

Additional steps

Add following lines in .bash_profile for user oracle

# Oracle Settings
export TMP=/tmp

export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.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

if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384 
       ulimit -n 65536
       ulimit -u 16384 -n 65536


Directory structure Create directory structure ORACLE_BASE – /ora01/app/oracle ORACLE_HOME – /ora01/app/oracle/product/12.1.0/db_1

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

Shared memory check Ensure that the /dev/shm mount area is of type tmpfs and is mounted with one of the following options:

  • With rw and execute permissions set on it
  • With noexec or nosuid not set on it

For example you can have following settings

[root@oel6 Desktop]# more /etc/fstab |grep "tmpfs"
tmpfs   /dev/shm   tmpfs   defaults   0 0

If necessary, change the mount settings. Open the /etc/fstab file with a text editor, and modify the tmpfs line:

tmpfs     /dev/shm     /tmpfs     rw,exec      0 0

Once it’s done remount it

mount -o remount tmpfs

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

su - oracle

--unizp software

--I defined 4 aliases in .bash_profile of user oracle to make 
--administration heaven :)

[oracle@oel6 ~]$ 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
[oracle@oel6 ~]$ envo
--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME 
[oracle@oel6 ~]$ cdob
[oracle@oel6 oracle]$ pwd

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

--run installation

1. Uncheck checkbox “I wish to receive security updates via My Oracle Support” and then click “Next” button. oracle_db12c_1 2. Ignore following message and click “Yes” button. oracle_db12c_2 3. Select “Create and configure a database” then click “Next” button. oracle_db12c_3 4. Select “Server class” and click “Next” button. oracle_db12c_4 5. Accept default “Single instance database installation” and click “Next” button. oracle_db12c_5 6. Select “Advanced install” to later select more options during database installation and click “Next” button. oracle_db12c_6 7. You can select language here. Once it’s done click “Next” button. oracle_db12c_7 8. You can select here type of binaries to install. Once it’s done click “Next” button. oracle_db12c_8 9. Here you should see directories for ORACLE_BASE and ORACLE_HOME for your binaries according to environmental settings. Click “Next” button. oracle_db12c_9 10. Accept default and click “Next” button. oracle_db12c_10 11. Accept default “General Purpose/ transaction Processing” and click “Next” button. oracle_db12c_11 12. Here you define your database name. Check checkbox “Create as Container database” and enter “Pluggable database name” to add your first container ORA12C and pluggable PORA12C1 database and click “Next” button. oracle_db12c_12 13. Specify more details about your database on 3 tabs where you can define memory settings, character set and if to install sample schema on your database. Once you are happy with your settings click “Next” button. oracle_db12c_13 oracle_db12c_14 oracle_db12c_15 14. Specify directory where you want to install your database files then click “Next” button. oracle_db12c_16 15. On this page you can register your database in Oracle Enterprise Manager”. Accept default settings and click “Next” button. oracle_db12c_17 16. Check checkbox “Enable Recovery” to specify directory for your recovery area “Recovery area location” and click “Next” button. oracle_db12c_18 17. Specify password for each user or enter the same for all. Once it’s done click “Next” button. oracle_db12c_19 18. Here you can specify OS group for each oracle group. Accept default settings and click “Next” button. oracle_db12c_20 19. Checks are started to verify if OS is ready to install database software. oracle_db12c_21 20. If everything is right click “Install” button. It’s the last moment to come back to each of previous point and make changes. oracle_db12c_22 21. Installation in progress … go play football :) oracle_db12c_23 22. Once binaries are installed the last step is to run 2 scripts as user root. oracle_db12c_24

--execute scripts

23. Installation will continue … oracle_db12c_25 24. Database Configuration Assistant will start automatically and create database for you. oracle_db12c_26 25. When database is ready you should see summary window. You can click “Password Management” to change passwords for many accounts in database. Once it’s done click “OK” button to continue. database_12c_29 oracle_db12c_28 26. You are lucky 12C installation is completed. Click “Close” button. oracle_db12c_29 27. Try to login as SYS to Enterprise manager Database express 12C . NOTE – It requires to install flash plug-in on OEL6. database_12c_32 database_12c_33 Remember it requires listener up and running. Have a fun 🙂 Tomasz

2 thoughts on “Install Oracle 12C Release 1 (12.1) on Oracle Linux 6 (OEL6)

  1. Thanks, i installed like as you, i have 2 questios
    1) i can not see create table space or table space menu on oem ,but the others users, i sawed in menu
    2) lsnrctl start, sqlplus /nolog and connect and database start but i can not run emctl;emctl not found so i can not run oem programs again.
    Thanks again. I Hope you will answer my probles.

Leave a Reply

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