Tuesday, August 23, 2016

Install Oracle 11gR2 on Linux


Step Installing Oracle 11gR2 on Linux 


Installing Oracle requires prerequisite component packages to installed. If the computer is connected with the internet, run the following command on Linux prompt.

[root@hostname]# yum install oracle-rdbms-server-11gR2-preinstall

The above line install the additional packages onto Linux.

It is probably worth doing a full update as well, but this is not strictly speaking necessary. The update process takes over an hour to complete.

[root@hostname]# yum update

Then, check other configuration values in "etc/sysclt.conf"

[root@hostname]# cat /etc/sysctl.conf

If you run the preinstallation package, the content in the sysctl.conf file shall be updated. To have new kernal parameter values take effect, run the following command

[root@hostname]# /sbin/sysctl -p

Add the following lines to "/etc/securty/limits.conf" file

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

Again, these lines are automatically added if you have run oracle-rdbms-server-11gR2-preinstall package.

Next create the new groups and uses.

[root@hostname]# groupadd -g 54321 oinstall
[root@hostname]# groupadd -g 54322 dba
[root@hostname]# groupadd -g 54323 oper
[root@hostname]# groupadd -g 54324 backupdba
[root@hostname]# groupadd -g 54325 dgdba
[root@hostname]# groupadd -g 54326 kmdba
[root@hostname]# groupadd -g 54327 asmdba
[root@hostname]# groupadd -g 54328 asmoper
[root@hostname]# groupadd -g 54329 asmadmin

Strangely enough, when adding group of "oinstall", dba group is also added, and new user "oracle" is created in Linux. After adding all group, run the following command to create user and assign groups to user. In this case, the user is oracle

[root@hostname]# useradd -u 54321 -g oinstall -G dba,oper oracle

Be sure to type in command as appeared above. Unnecessary space causes error. Then, set the password for user "oracle"

[root@hostname]# passwd oracle

Then, type new password and confirm the password.
Set secure Linux by edit file "/etc/selinux/config" file. The value inside the file = SELINUX=permissive
Once the value is change. Run the following command at prompt
[root@hostname]# setenforce Permissive

Then, disable the Linux firewall with following commands

[root@hostname]# service iptables stop
[root@hostname]# chkconfig iptables off

Create directory for Oracle software installation
[root@hostname]# mkdir -p /u01/app/oracle/product/11.2.0.1/db_1
[root@hostname]# chown -R oracle:oinstall /u01
[root@hostname]# chmod -R 775 /u01

Before running the installer, edit bash_profile for user "oracle". Use gedit to edit file
[root@hostname]# gedit /home/oracle/.bash_profile

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

ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.1/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID

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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Save and exit. Note that ORACLE_BASE and ORACLE_HOME is the directory, created earlier step

If installation is performed directly on Linux server, issue this xhost command

[root@hostname]# xhost +SI:localuser:oracle

Switch to user oracle

[root@hostname]# su oracle

Run the installer command where the runInstaller file is saved.

[root@hostname]# ./runInstaller

Then follow onscreen instruction until installation is complete.


No comments:

Post a Comment