You are on page 1of 6

Oracle Install on Linux

Click the below link for all the commands and steps

http://techlair.info/2015/11/08/oracl...

Step 1 - Edit Host Files – VI /etc/hosts

Vi /etc/hosts

127.0.0.1 localhost.localdomain localhost


192.168.0.210 Servername.localdomain server

Step 2 - Edit Kernel Parameters /etc/sysctl.conf

Vi /etc/sysctl.conf

Append the lines if parameter not found.

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

Press insert and paste


:!wq

sysctl -p - apply changes

Step 3 - Edit Limits file - etc/security/limits.conf

Insert lines
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384 (does not exceed these many processes)
oracle soft stack 10240
oracle hard stack 32768

Step 4 - Install dependencies

Command to check dependencies are installed

#rpm –qa | grep –I binutils

To install
#rpm –ivh binutils

yum install binutils -y


yum install compat-libcap1 -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

Step 5 - Add Groups and Users

Install the groups

#
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper

---Add user
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle

Step 6 - /etc/security/limits.d/90-nproc.conf

Vi
# Change this
* soft nproc 1024

# To this
* - nproc 16384

Step 7 - Set SELINUX

Vi /etc/sysconfig/selinux
Set to disable

SELINUX=permissive

run the command after edit setenforce Permissive

Step 8 - Stop Firewall


# service iptables stop

Copy firewall from startup

# chkconfig iptables of

Step 9 - Create directories for oracle Installation

mkdir -p /oracle/product/12.1.0/db_1
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle

#clear
# su – oracle

Step 10 - xhost +

Step 11 - Edit bash profile for oracle user /home/oracle/.bash_profile

# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=oracle_12C.localdomain
export ORACLE_UNQNAME=pmdb1
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=pmdb1

export PATH=/usr/sbin:$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

!wq

To apply the changes

#. . /.bash_profile
Step - 12 Extract Installation Files

unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip

Step - 13 Start the Oracle Universal Installer


Switch to oracle user
#su – oracle

Change to the directory


$ cd Oracle12c_r1xxx/
$

Unzip the files


$ unzip linuxamd64xxxfirst1file
$ unzip linuxsecond 2

$ cd database/

Disable security by running below command


$ xhost +

Runinstaller

./runInstaller

Values should match the home values FOR BASE, HOME

Post Installation

RUN 2 SCRIPTS FROM ROOT USER


1) /oracle/orainentory/orainstRoot.sh
2) /oracle/product/12/1/0/db_1/root.sh

# cd /oracle/orainentory/
# sh orainstRoot.sh

2) # root.sh

Enter for dir name.


dit the "/etc/oratab" file setting the restart flag for each instance to 'Y'

cdb1:/u01/app/oracle/product/12.1.0/db_1:Y