Installation of Oracle 11G Database in Linux,CentOS






For the installation of OBIEE 11G in Linux the first thing you have to do is to install the Oracle 11G database.

1.     Installing Oracle 11gR2 on Linux on RedHat EL 5 & Centos 5

There are basically 3 major steps for the successful completion of the Oracle 11G Database

·         Pre-Installation Tasks
·         Download & Install
·         Post-Installation Tasks
·         Common Installation Errors

      1  Pre-Installation Tasks   

      1.1 Create oracle User Account

 Login as root and create the  user “oracle” which belongs to “dba” group.



su – # groupadd dba # useradd -g dba, oracle


 



Note: “#” sign means that you need execute this command as root user.





1.2 Setting System parameters

a      Edit the /etc/sysctl.conf and add following lines

For doing this we have to edit the sysctl.conf file. This can be done in 2 ways-
·         Use the GUI method and traverse to the mentioned path and insert the statements
·         Using the terminal and insert the statement using the command

# vi /etc/sysctl.conf



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



Note: You need reboot system or execute “sysctl -p” command to apply above settings.
/sbin/sysctl -p

 




     1.3. Edit the /etc/pam.d/login  file and add following line

# vi /etc/pam.d/loginsession required pam_limits.so


1.4  Edit the /etc/security/limits.conf file and add following lines:

# vi /etc/security/limits.conf
oracle    soft  nproc  2047 oracle    hard  nproc  16384 oracle    soft  nofile  1024 oracle    hard  nofile  65536


1.5 Creating oracle directories



# mkdir /u01/app/oracle
# chown -R oracle:dba

/u01/app/oracle



                Setting Oracle Enviroment
ü  For  finding the ‘.bash_profile’ ,open the terminal and go to the home/user location(here in this case it is home/oracle). After reaching this location write a command to list all the files including hidden files(.bash_profile is a hidden file)

          ls -a

# su oracle
#$ vi ~/.bash_profile

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export
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

1.6 Check current status of SELinux: 

/usr/sbin/getenforce

If output is “Enforcing”then change mode to “Permissive” using following command:
/usr/sbin/setenforce 0

To prevent Enforcing mode restore after next reboots or to disable SELinux modify the /etc/sysconfig/selinux change value of SELINUX variable to permissive or disabled:

SELINUX=permissive


2. Download & Install

2.2.1 1. Download and install required .rpm packages
 
Some additional packages are required for succesful instalation of Oracle software. To check wheter required packages are installed on your operating system use following command:



rpm -q binutils compat-db compat-libstdc++-33 glibc glibc-devel glibc-headers gcc gcc-c++ libstdc++ gdbm make ksh elfutils-libelf sysstat libaio libaio-devel setarch unixODBC libXp libXtst xorg-x11-utils –qf ‘%{name}.%{arch}\n’|sort




Output for 32 bit (i386) Linuxversion:
binutils.i386
compat-db.i386
compat-libstdc++-33.i386
elfutils-libelf.i386
gcc-c++.i386
gcc.i386
gdbm.i386
glibc-devel.i386
glibc-headers.i386
glibc.i386
glibc.i686
ksh.i386
libaio-devel.i386
libaio.i386
libstdc++.i386
libXp.i386
libXtst.i386
make.i386
setarch.i386
sysstat.i386
unixODBC.i386
xorg-x11-utils.i386



NOTE:If some package is not installed then install it from installation media or download it from following locations:





There will be some packages missing click on the link mentioned above and install the required packages
Download the Oracle 11g release 2 (11.2.0.1.0) software from Oracle website.

Extract the files using following command:
For Databasesoftware installation:

unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip


3.       Start the Oracle software installation process.

Now the system is prepared for Oracle software installation. To start the installation process execute the following commands: Now the system is prepared for Oracle software installation. To start the installation process execute the following commands after going into the installation folder:


./runInstaller


Post-Instalation Tasks

Open sql developer and do a test connection. If the Test connection work successfull, it means that you have successfully installed the Oracle Database in Linux Environment

 

Common Installation Errors

DISPLAY not set. Please set the DISPLAY and try again.

> This issue I had faced as this failed at time of the Prerequisites. I ran the installable using the open terminal doing a su of the user. Instead switch via the GUI or enter directly as the user you created for the Installation. In this case oracle is the user.

 

Test connection not successful in sql plus after the Oracle 11G  Installation

This might be because the database is down. Execute the following commands mentioned below.

 

id
env | sort
sqlplus
/ as sysdba
startup

 

 


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s