oracle9i for rhel3 install
1、 准备好所需的以下安装包:
Oracle9i安装文件:
[Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio.gz
[Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk2.cpio.gz
[Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk3.cpio.gz
RHEL3的补丁文件:
p4198954_21_linux.zip
另注:
解压.gz文件的方法是:
gunzip [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio.gz
解压cpio文件的方法是:
cpio -idv < [Oracle9i.Database.Release.2.--.9.2.0.4.0.for.Linux.x86].ship_9204_linux_disk1.cpio
解压.zip文件的方法是:
unzip p4198954_21_linux.zip
2、 配置内核参数:
vi /etc/sysctl.conf
kernel.core_uses_pid = 1
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.shmall=2097152
kernel.sem=250 32000 100 128
net.ipv4.ip_local_port_range=1024 65000
fs.file-max=65536
3、 让所修改的内核参数及时生效:
sysctl -p
4、 添加安装和管理oracle软件所需的用户、组和目录:
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
passwd oracle
mkdir /oracle
mkdir /oradata
chown -R oracle:oinstall /oracle
chown -R oracle:oinstall /oradata
chown -R oracle:oinstall /software/
5、 配置输出环境变量,调出oracle安装图形界面locate机器:
export DISPLAY=10.1.1.1:0.0(图形界面显示到….这部机器)
xhost +(本机安装!如不是在本机安装请配置IP地址)
xclock(测试)
6、 安装oracle软件
su - oracle
./runInstall
一开始安装时,可能会出现这样的问题:
[oracle@oracle Disk1]$ ./runInstaller
[oracle@oracle Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2009-01-07_12-33-13PM/jre/bin/java. Please wait...
Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2009-01-07_12-33-13PM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
官方说明是这样的:
To install the compat-oracle-rhel4 and compat-libcwait packages you have to download the patch 4198954 from http://metalink.oracle.com. Make sure to select the Linux x86 platform for 32bit (for 64bit it would be patch 5386899). To unzip the downloaded p4198954_21_LINUX.zip file
去csdn上可以下载到以上包
p4198954_21_linux.zip
解压并安装(可能只能安装成功一个包,不过没什么关系,不会影响后来的安装工作),安装完成以后再切换到oracle用户运行./runInstall
7、 在RHEL4上安装ORACLE10G时出现的部分情况:
--------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
在rhel4上安装oracle10g的时候,当把安装文件传到/software上后,可能部分文件的权限会发生改变,像我在装的时候就出现了一下两个问题:
[oracle@test oraclelinux]$ ./runInstaller
./runInstaller: line 54: /software/oraclelinux/install/.oui: Permission denied
[oracle@test oraclelinux]$ ll /software/oraclelinux/install/.oui
-rw-r--r-- 1 oracle oinstall 163185 Jul 2 2005 /software/oraclelinux/install/.oui
[oracle@test oraclelinux]$ chmod 777 /software/oraclelinux/install/.oui
[oracle@test oraclelinux]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-01-08_10-15-51PM. Please wait ...sh: /software/oraclelinux/install/unzip: Permission denied
Error in writing to directory /tmp/OraInstall2009-01-08_10-15-51PM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
: Success
[oracle@test oraclelinux]$ ll /software/oraclelinux/install/unzip
-rw-r--r-- 1 oracle oinstall 102612 Jul 2 2005 /software/oraclelinux/install/unzip
[oracle@test oraclelinux]$ chmod 777 /software/oraclelinux/install/unzip
经过以上操作以后,才能顺利的调出安装界面
--------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------
cd /tmp/
sh orainstRoot.sh(运行此脚本是为了能让用户所选的组能够有升级oracle软件的权限)
cd /oracle/OraHome1
sh root.sh
8、 配置安装后环境变量:
export LD_ASSUME_KERNEL=2.4.1
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/OraHome1
#export ORACLE_SID=orcl(定义自己的数据库实例名)
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN
export THREADS_FLAG=native
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_BASE/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
PATH=$PATH:$HOME/bin:/$ORACLE_HOME/bin:/sbin
export PATH
unset USERNAME
即时应用环境变量所配置的内容:
. .bash_profile
至此oracle9i安装成功,但是安装后还存在一些问题,进入oracle9i的sql环境以后,会发现方向键在sql环境是用不了,此时必须安装几个定义方向键的几个包,配置方法请参考我的另一篇文章------------------------------------在RHEL3上安装并配置oracle9i的方向键支持