Installing Oracle 9i on OELRHEL 4.8 64bit

xiaowuhexiaoli發表於2022-01-10

Installing Oracle 9i on OEL/RHEL 4.8 64bit


June 16, 2012 |  No Comments#######################################################
################    PART A (Logged in as root)    #################
#######################################################
# Update date : 16/06/2012

1. Disabling SELinux  Disable SELinux now (If you couldn*t disable it during installation).
cat /etc/selinux/config

## === And make sure to set the SELINUX Flag disabled.
SELINUX=disabled

2. Installing missing libraries - You don*t know whether you have the required packages installed or not. Right! Don*t sweat. Run following commands to check whether you have those packages or not. If they are installed, the command prompt will return you their version, else &Not installed* message.

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

# 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

# cd /etc/yum.repos.d
# wget

[oracle@localhost igdbg]$ cd /etc/yum.repos.d/
[oracle@localhost yum.repos.d]$ cat rhel48.repo
[Server]
name=Server
baseurl=
enabled=1
gpgcheck=0
gpgkey=


package compat-db is not installed
package compat-libcom_err is not installed
package compat-libgcc-296 is not installed
package compat-libstdc++-296 is not installed
package gcc is not installed
package gcc-c++ is not installed

yum -y install compat-gcc-32 compat-gcc-32-c++ compat-gcc-32-c++ glibc-devel libaio-devel xorg-x11-deprecated-libs-devel compat-libcom_err compat-libgcc-296 compat-libstdc++-296 gcc gcc-c++


*******
安裝yum   32位
wget
tar xfz yum_forAS4.tar.gz
cd yum_forAS4
rpm -ivh *.rpm
********

3. Installing patches  You need to download three patches and install it. These patches are:

#Location :


wget
wget
wget

## === Navigate to the location where you have stored the downloaded file.

# rpm -Uvh compat-libcwait-2.1-1.i386.rpm
# rpm -Uvh compat-libcwait-2.1-2.x86_64.rpm
# rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm

********
ERROR: ld.so: object '/lib/libcwait.so'報錯解決
此文來自:http://www.cnblogs.com/snigoal/archive/2012/07/17/2596569.html
在RH Linux AS4 x86-64 安裝Oracle9.2.0.4前打補丁Patch 4198954中的compat-libcwait-2.1-1.i386.rpm 報如下的錯誤:

[root@oracle8 oracle]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm
ERROR: ld.so: object '/lib/libcwait.so' from /etc/ld.so.preload cannot be preloaded: ignore

Google了半天找到解決辦法:
# echo "" > /etc/ld.so.preload
64位系統沒有這個檔案導致報錯
*********

4. ﹞ User and Group Creation  Oracle installer wouldn*t run as the root user, so you need to create a user. It would be better, if you create a special group for Oracle. To do these, run the following commands in the command prompt.

groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle

5. ORACLE_BASE Directory Creation -Login as root and create base directory for Oracle ($ORACLE_BASE).

mkdir -p /opt/orcl9i
chown -R oracle:oinstall /opt

6. ﹞ Setting up the kernel parameters  You also need to do a little modification in the the kernel parameters. You need to open the sysctl.conf file
# vi /etc/sysctl.conf

## === Add/update the following lines

# Oracle Kernel Setting for Oracle 9i
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

## === Save and close the file. You need to run a command to update the parameters
sysctl -p

#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

# Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
vi /etc/pam.d/login

session required pam_limits.so

#Add the following lines to /etc/profile:
if [ $USER = ※oracle§ ]; then
if [ $SHELL = ※/bin/ksh§ ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

#######################################################
#############   PART B (Logged in as oracle)   ####################
#######################################################

7. ﹞ Setting Environment Variables 每 Now since you have created the oracle user, you need to setup its environment variables. For that, you need to update oracle*s .bash_profile file.

ORACLE_SID=ora9ibpm
ORACLE_BASE=/opt/orcl9i
ORACLE_TERM=xterm
ORACLE_HOME=/opt/orcl9i/product/9.2.4

Open bash profile of Oracle:

#vi ~/.bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export LD_ASSUME_KERNEL=2.4.19
export ORACLE_BASE=/opt/orcl9i
export ORACLE_HOME=/opt/orcl9i/product/9.2.4
export ORACLE_SID=ora9ibpm
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64/

# vi ~/.bashrc

alias dba="sqlplus '/as sysdba'"
alias alert=§tail -100f /opt/orcl9i/admin/ora9ibpm/bdump/alert_ora9ibpm.log

8. Download Oracle 9i - Download the Oracle 9i (9.2.0.4) ,store the files in oracle*s home directory. Launch the command prompt and navigate there.

wget
wget
wget

## === Unzip the files -

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

## === Unpack the cpio files -

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

9. ﹞ Starting Oracle Installer - Now you are all set for Oracle installation. In the command prompt go to the Disk1 directory and run runInstaller file.

cd /opt/source/Disk1
export LD_ASSUME_KERNEL=2.4.19
export DISPLAY=10.148.53.74:0.0
./runInstaller

******
在 Linux x86-64 as4.8 下安裝oralce9204到17%時出現卡住,oracle安裝檔案是amd64_db_9204_Disk1.cpio.gz
左邊出現的錯誤是Error in writing to file
/u01/app/oracle/.....
,右邊是在安裝過程中,終端裡會出現以下內容:
Inside isClusterMode. bCluster bfr is : false
Inside isCluster. bCluster bfr return is : false
Inside isCluster. bCluster bfr return is : false
該問題是由於redhat核心版本比較高的原因,可以通過在ORACLE使用者的環境變數中新增LD_ASSUME_KERNEL=2.4.19引數以騙過ORACLE,
export LD_ASSUME_KERNEL=2.4.1
新增完引數後讓引數檔案重新生效一下,關閉當前安裝介面,刪除前面安裝過程中產生的檔案,重新開啟一個Terminal進行安裝即可通過
經測試:as4.x 64的可以,as5.x 64位的不支援。
*******

- Install Software Only, we*ll run dbca later.
10. Error during DBCA, when checking sqlplus, getting Sementation Fault.
# ERROR WHEN DBCA/LSNRCTL
Segmentation Fault When Execute Sqlplus, Oracle, Lsnrctl After New/Patchset Install [ID 316746.1]

java.io.IOException: Bad file descriptor
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:194)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine$ErrorStreamReader.run(SQLEngine.java:1985)
at java.lang.Thread.run(Thread.java:534)

# Solution
To implement the solution, please execute the following steps:

Refer to:
1. cd /usr/bin (as root)
2. mv gcc gcc.script
3. mv g++ g++.script
4. ln -s gcc32 gcc
5. ln -s g++32 g++
6. login as oracle software owner (make sure environment is correct)
7. cd $ORACLE_HOME/bin
8. relink all > relink.txt 2>&1 (check relink.txt for errors)

Re-run the dbca


******由9.2.0.4升級到9.2.0.8
wget
unzip p4547809_92080_Linux-x86-64.zip
cd /opt/source/Disk1
export LD_ASSUME_KERNEL=2.4.19
export DISPLAY=10.148.53.74:0.0
./runInstaller

在oui圖形介面,指定oracle_home_name(如果oracle_home名指定正確,自動會找到以前oracle安裝的路徑)和路徑,然後next,當提示用root使用者執行$ORACLE_HOME/root.sh指令碼時,按照提示執行root.sh指令碼,然後等安裝完成後退出oracle universal installer即可;

查詢oracle_home name
cat /opt/orcl9i/oraInventory/ContentsXML/inventory.xml

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69978530/viewspace-2851450/,如需轉載,請註明出處,否則將追究法律責任。

相關文章