Oracle9i 2.0.4在Red Hat Enterprise Linux AS 3上的安装
(我测试了两遍都OK)
1、确认安装了以下软件包
[oracle@Gledeson oracle]$ rpm -qa | grep openmotif
openmotif21-2.1.30-8
openmotif-devel-2.2.3-3.RHEL3
openmotif-2.2.3-3.RHEL3
[oracle@Gledeson oracle]$ rpm -qa |grep setarch
setarch-1.3-1
[oracle@Gledeson oracle]$ rpm -qa|grep compat
compat-gcc-c++-7.3-2.96.128
compat-glibc-7.x-2.2.4.32.6
compat-slang-1.4.5-5
compat-pwdb-0.62-3
compat-libstdc++-devel-7.3-2.96.128
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
2、建立Oracle帐号
groupadd dba
groupadd oinstall
useradd -c "Oracle software owner" -g oinstall -G dba oracle
passwd oracle
3、建立文件目录
su root
mkdir /u01
mkdir /u01/oracle
mkdir /u01/oracle/product
mkdir /u01/oracle/product/9.2.0
chown -R oracle.oinstall /u01/oracle
mkdir /var/opt/oracle
chown oracle.dba /var/opt/oracle
chmod 755 /var/opt/oracle
4、设置环境变量
用Oracle帐号执行下列命令:(或直接copy到.bash_profile文件中)
# Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9,
# RHEL AS 3, and RHEL AS 4 !!
# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:
#export LD_ASSUME_KERNEL=2.4.1 # for RH 9 and RHEL AS 3
#export LD_ASSUME_KERNEL=2.4.19 # for RHEL AS 4
export LD_ASSUME_KERNEL=2.4.1
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=ORADB01
export ORACLE_TERM=xterm
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin
保存后退出. 执行: source .bash_profile
然后。退出登录,再次进入,这时候oracle的环境就已经生效了
5、设置内核参数
su root
修改 /etc/sysctl.conf 这个文件,加入以下的语句:
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
参数说明:
sem 4个参数依次为SEMMSL(每个用户拥有信号量最大数);
SEMMNS(系统信号量最大数);
SEMOPM(每次semopm系统调用操作数);
SEMMNI(系统辛苦量集数最大数).
Shmmax 最大共享内存2GB 物理内存如果小的话可以设置成 536870912.
Shmmni 最小共享内存 4096KB.
Shmall 所有内存大小.
6、安装补丁
(ORACLE9i 9204版,只需在运行runInstall前打p3006854_9204_LINUX.zip 补丁即可,
其他补丁不用再打)
安装补丁前,却换到root用户的控制台,打补丁前执行以下语句:
su root
mv /usr/bin/gcc /usr/bin/gcc323
ln -s /usr/bin/gcc296 /usr/bin/gcc
mv /usr/bin/g++296 /usr/bin/g++
ln -s /usr/bin/g++ /usr/bin/g++296
[root@localhost /]# sh rhel3_pre_install.sh
Applying patch...
Ensuring permissions are correctly set...
Done.
Patch successfully applied
7、解压文件
zcat ship_9204_linux_disk1.cpio | cpio -idmv
zcat ship_9204_linux_disk2.cpio | cpio -idmv
zcat ship_9204_linux_disk3.cpio | cpio -idmv
这时生成三个目录:Disk1、Disk2、Disk3
8、cd到Disk1中
cd /Disk1
./runInstall.sh