Thomson-Blog ( 学习,学习,再学习;努力,努力,再努力。)
在学习的路上不断成长,成功之路就在脚下。

 

Installation of Oracle 9i (R2) on (Oracle) Enterprise Linux 4



This paper (HOWTO) describes step-by-step installation of Oracle 9i database software on Enteprise Linux 4. Installation steps are valid for 32 bit (x86) and 64 bit (x86_64) architectures.

This paper covers following steps:

 

Pre-Instalation Tasks

1. Create oracle User Account

Login as root and create te user oracle which belongs to dba group.

su -
# groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba oracle


2. Setting System parameters
Edit the /etc/sysctl.conf and add following lines:

kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Note: You need execute "sysctl -p" or reboot system to apply above settings.

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

* - nproc 16384
* - nofile 16384


3. Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile file and add following lines:

Use this settings for 32bit (x86) architecture.

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/920
ORACLE_SID=MYORACLE
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_ASSUME_KERNEL=2.4.19
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_ASSUME_KERNEL PATH


Use this settings for 64bit (x86_64) architecture.

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/920
ORACLE_SID=MYORACLE
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH


Save the .bash_profile and execute following commands for load new enviroment:

cd /home/oracle
. .bash_profile


4. Create base directory for Oracle

Login as root and create base directory for Oracle ($ORACLE_BASE).

su -
# cd /opt
# mkdir oracle
# chown oracle:dba oracle

 

Download & Install

1. Install required .rpm packages

Some additional packages are required for succesful instalation of Oracle software. To check whether required packages are installed on your operating system one of following commands:

rpm -q compat-db compat-gcc-32 compat-gcc-32-c++ compat-libcom_err compat-libcwait compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers glibc-kernheaders libgcc make


or

rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n'|egrep 'binutils|compat|glibc|gcc|make'|sort


Required packages for 32bit (x86) architecture:

binutils-2.15.92.0.2-21
compat-db-4.1.25-9
compat-gcc-32-3.2.3-47.3
compat-gcc-32-c++-3.2.3-47.3
compat-libcom_err-1.0-5
compat-libcwait-2.1-1
compat-libgcc-296-2.96-132.7.2
compat-libstdc++-296-2.96-132.7.2
compat-libstdc++-33-3.2.3-47.3
gcc-3.4.6-3.1
gcc-c++-3.4.6-3.1
glibc-2.3.4-2.25
glibc-common-2.3.4-2.25
glibc-devel-2.3.4-2.25
glibc-headers-2.3.4-2.25
glibc-kernheaders-2.4-9.1.98.EL
libgcc-3.4.6-3.1
make-3.80-6.EL4.i386

Note: Package compat-libcwait-2.1-1.i386.rpm is not included in Enterpise Linux installation media. You can download this package here.

Required packages for 64bit (x86_64) architecture:

binutils-2.15.92.0.2-21.x86_64
compat-db-4.1.25-9.i386
compat-db-4.1.25-9.x86_64
compat-gcc-32-3.2.3-47.3.x86_64
compat-gcc-32-c++-3.2.3-47.3.x86_64
compat-libcom_err-1.0-5.i386
compat-libcom_err-1.0-5.x86_64
compat-libgcc-296-2.96-132.7.2.i386
compat-libstdc++-296-2.96-132.7.2.i386
compat-libstdc++-33-3.2.3-47.3.i386
compat-libstdc++-33-3.2.3-47.3.x86_64
gcc-3.4.6-3.1.x86_64
gcc-c++-3.4.6-3.1.x86_64
glibc-2.3.4-2.25.i686
glibc-2.3.4-2.25.x86_64
glibc-common-2.3.4-2.25.x86_64
glibc-devel-2.3.4-2.25.i386
glibc-devel-2.3.4-2.25.x86_64
glibc-headers-2.3.4-2.25.x86_64
glibc-kernheaders-2.4-9.1.98.EL.x86_64
libgcc-3.4.6-3.1.i386
libgcc-3.4.6-3.1.x86_64
make-3.80-6.EL4.x86_64



Install the required packages using the rpm command:

# rpm -ivh <package_name>.rpm



If all required packages were installed succesfuly then login as root and switch the GCC 3.4 compiler binary with GCC 3.2 compiler binary as following:

su -
# cd /usr/bin
# mv ./gcc ./gcc34
# mv ./gcc32 ./gcc


2. Download the Oracle 9i (9.2.0.4) software from Oracle website for apropriate architecture.
Direct link to Oracle Database 32bit (x86)
Direct link to Oracle Database 64bit (x86_64)

Extract the files using following command (for 32bit architecture):

gunzip ship_9204_linux_disk1.cpio.gz
gunzip ship_9204_linux_disk2.cpio.gz
gunzip ship_9204_linux_disk3.cpio.gz

cpio -idmv < ship_9204_linux_disk1.cpio
cpio -idmv < ship_9204_linux_disk2.cpio
cpio -idmv < ship_9204_linux_disk3.cpio


or for 64bit architecture:

gunzip amd64_db_9204_Disk1.cpio.gz
gunzip amd64_db_9204_Disk2.cpio.gz
gunzip amd64_db_9204_Disk3.cpio.gz

cpio -idmv < amd64_db_9204_Disk1.cpio
cpio -idmv < amd64_db_9204_Disk2.cpio
cpio -idmv < amd64_db_9204_Disk3.cpio

When all archives were extracted you've got three directories Disk1, Disk2 and Disk3.


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 (as oracle):

cd Disk1
./runInstaller

 

Post-Instalation Tasks

1. Switch back the GCC binaries

su -
# cd /usr/bin
# mv ./gcc ./gcc32
# mv ./gcc34 ./gcc


2. (Optional) You may consider to use rlwrap for comfortable work with sqlplus. RPM package for RedHat compatible (x86) distribution you can download here. RPM for x86_64 architecture you can download here.

su -
# rpm -ivh rlwrap-0.24-rh.i386.rpm
# exit
echo "alias sqlplus='rlwrap sqlplus'" >> /home/oracle/.bash_profile
. /home/oracle/.bash_profile


Common Installation Errors

Unable to load native library: /tmp/OraInstall2006-12-20_11-11-34AM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
Solution: Install new JRE 1.3.1 version. Edit the Disk1/install/linux/oraparam.ini and set path to new JRE for JRE_LOCATION variable. For more information see Download & Install section.

/opt/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Solution: Set the LD_ASSUME_KERNEL=2.4.19

/tmp/OraInstall2006-12-20_11-38-19AM/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
Solution: Install the xorg-x11-deprecated-libs package.

Starting Oracle Intelligent Agent.../opt/oracle/920/bin/dbsnmpwd: line 156: 10736 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 10749 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 10761 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 10773 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1

Solution: Download and apply patch nr.: 3238244 from http://metalink.oracle.com.

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
Solution: Execute "export DISPLAY=:0.0" (as oracle user) and "xhost +" as user who has opened X session (for example logged in KDE, GNOME, etc.). If the value is other than 127.0.0.1 or localhost you should "xhost +" on client machine.

Error in invoking target install of makefile /opt/oracle/920/ctx/lib/ins_ctx.mk
Error in invoking target install of makefile /opt/oracle/920/precomp/lib/ins_precomp.mk
Error in invoking target install of makefile /opt/oracle/920/plsql/lib/ins_plsql.mk
Error in invoking ntcontab.o of makfile /opt/oracle/920/network/lib/ins_net_client.mk

Solution: Some of required packages is missing (not installed on your OS) or GCC binaries wasn't changed. For more information see Download & Install section.

Last update: 23-01-2007. Comments, suggestions, questions, errors (also grammatical :) )? Feel free to contact me.
posted on 2009-08-04 13:40  Thomson-Blog  阅读(352)  评论(0编辑  收藏  举报