You are on page 1of 14

Oracle Database 11g Release 2 (11.

2) Installation On Oracle
Linux 6
Posted on October 26, 2011 by shahinshaukat
This article describes the installation of Oracle Database 11g Release 2 (11.2) (64-bit) on Oracle
Linux 6 (64-bit). The article is based on a server installation with a minimum of 2G swap, with
both SELinux and the firewall disabled. The following package groups were included for this
installation.
* Base System
o Base
o Debugging Tools
o Directory Client
o Hardware monitoring Client
o Large Systems Performance
o Network file system client
o Performance Tools
o Perl Support
* Servers
o Server Platform
o System administration tools
* Desktops
o Desktop
o Desktop Platform
o Fonts
o General Purpose Desktop
o Graphical Administration Tools
o X Windows System
* Applications
o Internet Browser
* Development
o Development Tools
An example of this type of Linux installations can be seen here. Alternative installations may
require more packages to be loaded, in addition to the ones listed below.
* Download Software
* Unpack Files
* Hosts File
* Set Kernel Parameters
* Setup
* Installation
* Post Installation
Download Software
Download the Oracle software from OTN or MOS depending on your support status.
* OTN: Oracle Database 11g Release 2 (11.2.0.1) Software (64-bit)
* MOS: Oracle Database 11g Release 2 (11.2.0.2) Software (64-bit)
Unpack Files
Unzip the files.
# 11.2.0.1
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
#11.2.0.2
unzip p10098816_112020_Linux-x86-64_1of7.zip
unzip p10098816_112020_Linux-x86-64_2of7.zip
You should now have a single directory called database containing installation files.
Hosts File
The /etc/hosts file must contain a fully qualified name for the server.
For example.
127.0.0.1 localhost.localdomain localhost
192.168.2.181 ol6-11gr2.localdomain ol6-11gr2
Set Kernel Parameters
Oracle recommend the following minimum parameter settings.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
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
The current values can be tested using the following command.
/sbin/sysctl -a | grep
Add or amend the following lines in the /etc/sysctl.conf file.
fs.suid_dumpable = 1
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=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the /etc/security/limits.conf file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is
set as follows.
SELINUX=disabled
Once the change is complete, restart the server.
Setup
Install the following packages if they are not already present.
# From Oracle Linux 6 DVD
cd /media/cdrom/Server/Packages
rpm -Uvh binutils-2*x86_64*
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i686*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh elfutils-libelf-0*x86_64*
rpm -Uvh elfutils-libelf-devel-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-0*i686*
rpm -Uvh libaio-devel-0*i686*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i686*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i686*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh make-3.81*x86_64*
rpm -Uvh numactl-devel-2*x86_64*
rpm -Uvh sysstat-9*x86_64*
rpm -Uvh compat-libstdc++-33*i686*
cd /
eject
Note. This will install all the necessary 32-bit packages for 11.2.0.1. From 11.2.0.2 onwards
many of these are unnecessary, but having them present does not cause a problem.
Create the new groups and users.
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 506 asmdba
groupadd -g 505 asmoper
useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
passwd oracle
Note. We are not going to use the asm groups, since this installation will not use ASM.
Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Login as root and issue the following command.
xhost +
Login as the oracle user and add the following lines at the end of the .bash_profile file.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ol6-11gr2.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/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
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental
variable.
DISPLAY=:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database
directory.
./runInstaller
Proceed with the installation of your choice. The prerequisites checks will fail for the following
version-dependent reasons:
* 11.2.0.1: The installer shows multiple missing package failures because it does not recognize
several of the newer version packages that were installed. These missing package failures can
be ignored as the packages are present. The failure for the pdksh package can be ignored
because we installed the ksh package in its place.
* 11.2.0.2: The installer should only show a single missing package failure for the pdksh
package. It can be ignored because we installed the ksh package in its place.
You can see the installation I performed by clicking on the links below to see screen shots of
each stage.
1. Configure Security Updates
2. Select Install Option
3. System Class
4. Node Selection
5. Select Install Type
6. Typical Install Configuration
7. Create Inventory
8. Perform Prerequisite Checks
9. Summary
10. Install Product
11. Database Configuration Assistant
12. Database Configuration Assistant 2
13. Execute Configuration Scripts
14. Finish
Post-Instalation Tasks
1. (Optional) Auto Startup and Shutdown of Database and Listener
Login as root and modify /etc/oratab file and change last character to Y for apropriate database.
ORCL:/opt/oracle/111:Y
As root user create new file oracle (init script for startup and shutdown the database) in
/etc/init.d/ directory with following content:
#!/bin/bash
#
# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Oracle Database startup script
# Source function library.
. /etc/rc.d/init.d/functions
ORACLE_OWNER=oracle
ORACLE_HOME=/opt/oracle/111
case $1 in
start)
echo -n $Starting Oracle DB:
su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart $ORACLE_HOME
echo OK
;;
stop)
echo -n $Stopping Oracle DB:
su $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME
echo OK
;;
*)
echo $Usage: $0 {start|stop}
esac
Execute (as root) following commands (First script change the permissions, second script is
configuring execution for specific runlevels):
chmod 750 /etc/init.d/oracle
chkconfig -add oracle -level 0356
2. (Optional) Auto Startup and Shutdown of Enterprise Manager Database Control
As root user create new file oraemctl (init script for startup and shutdown EM DB Console) in
/etc/init.d/ directory with following content:
#!/bin/bash
#
# oraemctl Starting and stopping Oracle Enterprise Manager Database Control.
# Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Enterprise Manager DB Control startup script
# Source function library.
. /etc/rc.d/init.d/functions
ORACLE_OWNER=oracle
ORACLE_HOME=/opt/oracle/111
case $1 in
start)
echo -n $Starting Oracle EM DB Console:
su $ORACLE_OWNER -c $ORACLE_HOME/bin/emctl start dbconsole
echo OK
;;
stop)
echo -n $Stopping Oracle EM DB Console:
su $ORACLE_OWNER -c $ORACLE_HOME/bin/emctl stop dbconsole
echo OK
;;
*)
echo $Usage: $0 {start|stop}
esac
Execute (as root) following commands (First script change the permissions, second script is
configuring execution for specific runlevels):
chmod 750 /etc/init.d/oraemctl
chkconfig -add oraemctl -level 0356
3. (Optional) You may consider to use rlwrap for comfortable work with sqlplus and adrci utility.
RPM package for RedHat compatible (x86) distribution you can download here.
su -
# rpm -ivh rlwrap-0.24-rh.i386.rpm
# exit
echo alias sqlplus=rlwrap sqlplus >> /home/oracle/.bash_profile
echo alias adrci=rlwrap adrci >> /home/oracle/.bash_profile
. /home/oracle/.bash_profile
Common Installation Errors
DISPLAY not set. Please set the DISPLAY and try again.
Solution: Execute export DISPLAY=:0.0 when you perform installation on local machine or
export DISPLAY=:0.0 when you perform installation on remote machine connected over SSH.
Dont forget to execute xhost + command on client machine.
error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or
directory
Solution: Install libaio and libaio-devel packages. If packages already installed and error still
occurs try execute ldconfig as root.
Check complete. The overall result of this check is: Failed <<<<
Solution: Install missing package or set check system parameters (See reason of failure).
Common Errors
DISPLAY not set. Please set the DISPLAY and try again.
From one xterm run su oracle-user then run export DISPLAY=localhost:0.0
From another xterm run: xhost + and then from the first xterm run the installer.
Check complete. The overall result of this check is: Failed <<<
Install missing package or check system parameters (See reason of failure).
No one from outside can connect to database through listener
Edit the tnsnames.ora file as below.
$ cat /opt/app/oracle/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/app/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/app/oracle)
(PROGRAM = extproc)
)
(SID_DESC=
(GLOBAL_DBNAME=hudson)
(ORACLE_HOME=/opt/app/oracle)
(SID_NAME=hudson)
)
)
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =10.8.19.71)(PORT = 1521))
)
)
Restart the listener with the below command
$lsnrctl stop
$lsnrctl start
And now listener supports service and you can connect to database.
$ lsnrctl status
LSNRCTL for Linux: Version 11.1.0.6.0 Production on 26-DEC-2009 12:39:24
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 Production
Start Date 25-DEC-2009 20:18:17
Uptime 0 days 16 hr. 21 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/network/admin/listener.ora
Listener Log File /opt/app/diag/tnslsnr/centos/listener/alert/log.xml
Listening Endpoints Summary
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos.localdomain)(PORT=1521)))
Services Summary
Service hudson has 1 instance(s).
Instance hudson, status READY, has 1 handler(s) for this service
Service hudsonXDB has 1 instance(s).
Instance hudson, status READY, has 1 handler(s) for this service
Service hudson_XPT has 1 instance(s).
Instance hudson, status READY, has 1 handler(s) for this service
The command completed successfully
Unable to connect to database server
Disable the firewall with below commands
/etc/init.d/iptables save
/etc/init.d/iptables stop


Source:

http://www.server-world.info/en/note?os=Scientific_Linux_6&p=oracle11g

http://easytosolve.wordpress.com/2011/10/26/oracle-database-11g-release-2-11-2-installation-on-
oracle-linux-6/






Installing RCU:
SOLUTION to the Problem : http://www.reachdba.com/showthread.php?779-RCU-Installation-on-Linux-
6-64-bit-Exception-java-lang-UnsatisfiedLinkError
For correcting the above error please installed the given 32 bit rpms:

rpm -Uvh libXau-1.0.5-1.el6.i686.rpm
rpm -Uvh libxcb-1.5-1.el6.i686.rpm
rpm -Uvh libX11-1.3-2.el6.i686.rpm
rpm -Uvh libXext-1.1-3.el6.i686.rpm
rpm -Uvh libXi-1.3-3.el6.i686.rpm
rpm -Uvh libXtst-1.0.99.2-3.el6.i686.rpm

Setting JAVA_HOME for a Single User
1. Locate absolute path to the JAVA installation.
2. Open up the .bash_profile in your terminal using vi:
1 vi ~/.bash_profile
3. Set the JAVA_HOME environment variable using the following syntax and using the path you got
from the above method:
1 export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_32
4. Now, its time to set the PATH variable. Its the same path as the one you set for JAVA_HOME;
only excluding the java console:
1 export PATH=$PATH:/usr/lib/jvm/jdk1.6.0_32/bin
5. Now, all you have to do is logout and login back to the session for JAVA_HOME to take effect!
Alternatively, if you would prefer the changes to take effect immediately, just type the following
in the terminal:
1 source ~/.bash_profile
6. or:
1 . ~/.bash_profile

Setting JAVA_HOME for All Users
1. Locate absolute path to the JAVA installation.
2. Open up the profile in your terminal using vi:
1 sudo vi /etc/profile
3. Set the JAVA_HOME environment variable using the following syntax:
1 export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_32
4. Dont forget to set the PATH variable too:
1 export PATH=$PATH:/usr/lib/jvm/jdk1.6.0_32/bin
5. You can now logout and login back to the session for the settings youve made to take effect
immediately, or just type the following for an immediate effect:
1 source /etc/profile
6. or:
1 . /etc/profile



378112.1

http://sangramkeshari.wordpress.com/2012/11/
How to run Repository Creation Utility (RCU) on 64-bit Linux
Posted by: Kevin Smith on Sep 26, 2012 | No Comments
I was setting up WebCenter Content (WCC) on a new virtual box running 64-bit Linux and ran
into a problem when I tried to run the Repository Creation Utility (RCU). I saw this error when
trying to start RCU
.../rcuHome/jdk/jre/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No
such file or directory
I think I remember running into this before and reading something about RCU only being
supported on 32-bit Linux. I decided to try and see if I could get it to run on 64-bit Linux.
I saw it was using it's own copy of java (.../rcuHome/jdk/jre/bin/java), so I decided to try and get
it to use the 64-bit JRockit I had already installed. I edited the rcu script in rcuHome/bin and
replaced
JRE_DIR=$ORACLE_HOME/jdk/jre
with
JRE_DIR=/apps/java/jrockit-jdk1.6.0_29-R28.2.2-4.1.0
Sure enough that fixed it. I was able to run RCU and create the WCC schema.


http://jjzheng.blogspot.in/2012/09/setup-your-own-webcenter-suite-on-vm.html

For WCC Prerequisits

rpm -Uvh compat-libstdc++-33-3.2.3-69.el6.i686.rpm

You might also like