Friday, October 4, 2019

How to install Oracle 11g R2 in RHEL 7 GUI Mode

how to install oracle 11g in Rhel7 linux GUI

step.1.Create a directory and copy file.
# mkdir /u01/
#linux.x64_11gR2_database_1of7.zip
#linux.x64_11gR2_database_2of7.zip

step.2.unzip the oracle 11g software.

#unzip linux.x64_11gR2_database_1of7.zip 
#unzip linux.x64_11gR2_database_2of7.zip 

Now you have a single Database folder which is have runInstaller file.

Step.3.Edit Hosts File

In the Hosts file you have to fully specify your hostname and your machine IP address.

#vi /etc/hosts
For Example.

<ip address >  <full name of machine >   <short name of your machine>
After update this file press Esc then shif+: then wq  then Enter.

Start configuration to install Oracle 11g R2

Step 4.

Edit /etc/sysctl.conf file and add below parameter in end of this file.

#vi /etc/sysctl.conf

 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
 net.core.rmem_default=262144
 net.core.rmem_max=4194304
 net.core.wmem_default=262144
 net.core.wmem_max=1048586
After that run below command for applying changes of sysctl file.

#/sbin/sysctl -p
Now Edit /etc/security/limits.conf and add following lines in end of this file.

#vi /etc/security/limits.conf

oracle              soft nproc 2047
oracle              hard nproc 16384
oracle              soft nofile 4096
oracle              hard nofile 65536
oracle              soft stack 10240


Step 5.

Now Edit /etc/pam.d/login file and end following parameter

#vi /etc/pam.d/login

session    required   pam_limits.so
Step 6.

Now install required packages for configuring Oracle Database for installing these rmp using YUM server for yum server configuration see my yum server configuration post.

yum install binutils -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
yum install zlib-devel -y
yum install elfutils-libelf-devel -y
Now add some group and add a user for Oracle installation.

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


useradd -g oinstall -G dba,oper oracle
passwd oracle
Step 8.

Now create a Directory and change  directory permissions

mkdir -p /u01/app/oracle/product/11.2.0.4/db_1
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/
Step 9.

Now set selinux=permissive

#vi /etc/selinux/config
Step 10.

Now make firewall disabled using setup command. Following below steps.

 #systemctl disable firewalld


Step 11.

Now connect you oracle user using su command then open .bash_profile command and add following command in end of file.

#su – oracle

$vi .bash_profile

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

 export TMPDIR
 ORACLE_HOSTNAME='hostname'
 ORACLE_UNQNAME=db11g; export ORACLE_UNQNAME
 ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
 ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1; export ORACLE_HOME
 ORACLE_SID=db11g; export ORACLE_SID
 ORACLE_TERM=xterm; export ORACLE_TERM
 PATH=/usr/sbin:$PATH; export PATH
 PATH=$ORACLE_HOME/bin:$PATH; export PATH

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

if [ $USER = "oracle" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
 fi
Step 12.

Now reboot your pc and login with Oracle user and follow below steps.

$cd /u01/database

$./runInstaller


/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.2.0/dbhome_1/root.sh

No comments:

Post a Comment

HOW TO TO CALCULATE TABLE SIZE IN MB AND CREATE EXCEL SHEET IN MYSQL 5.7 USING CENTOS 7

 HOW TO TO CALCULATE TABLE SIZE IN MB AND CREATE EXCEL SHEET IN MYSQL 5.7 USING CENTOS 7 1.Given command below:- SELECT       table_schema a...