linux redhat enterprise 4 上安装 oracle9i

安装第一步,确保以下RPM都已经安装好。

Disk3    compat-db-4.1.25-9
Disk4    compat-gcc-32-3.2.3-47.3
Disk4    compat-gcc-32-c++-3.2.3-47.3
Disk3    compat-libgcc-296-2.96-132.7.2
Disk3    compat-libstdc++-296-2.96-132.7.2
Disk2    compat-libstdc++-33-3.2.3-47.3
Disk3    gcc-3.4.3-9.EL4
Disk3    gcc-c++-3.4.3-9.EL4
Disk3    gnome-libs-1.4.1.2.90-44

Disk4    gnome-libs-devel-1.4.1.2.90-44(第四张光盘)
{
Disk4        ORBit-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
    {
    Disk4    glib-devel is needed by ORBit-devel-0.5.17-14.i386
    }
Disk4        gtk+-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
Disk4        imlib-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
}

Disk3    libaio-devel-0.3.102-1
Disk3    libaio-0.3.102-1
Disk2    make-3.80-5
Disk3    openmotif21-2.1.30-11
Disk3    xorg-x11-deprecated-libs-devel-6.8.1-23.EL
Disk2    xorg-x11-deprecated-libs-6.8.1-23.EL
以下三个其实是补丁
{
    compat-oracle-rhel4-1.0-3
        [url]http://oss.oracle.com/projects/compat-oracle/files/RedHat/[/url]
    compat-libcwait-2.0-1
        [url]http://oss.oracle.com/projects/compat-oracle/files/RedHat/[/url]
    p3006854_9204_LINUX(直接执行里面的脚本即可)
        [url]http://pack.hacker.cn/Update/Pack/0racle/05121616492554368.shtml[/url]
}
安装第二步 设置环境变量
修改/home/oracle/.bash_profile,以下样本是刚装后系统后立即添加设置的样子

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
LD_ASSUME_KERNEL=2.4.19  #系统为redhat 4时的设置
#如果系统为redhat 3时应该为LD_ASSUME_KERNEL=2.4.1
# +------------------------------------------------------------+
# | FILE : .bash_profile |
# +------------------------------------------------------------+
umask 022
TERM=xterm; export TERM
TMPDIR=/tmp; export TMPDIR
# +--------------------------+
# | SETUP ORACLE ENVIRONMENT |
# +--------------------------+
export ORACLE_SID=ORCL
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2.0
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_OWNER=oracle
export ORACLE_TERM=xterm
#export LDEMULATION=elf_i386_glibc21
export GCC_EXEC_PREFIX=/usr/i386-glibc21-linux/lib/gcc-lib/
# +--------------------------+
# | LINUX STUFF |
# +--------------------------+
export LD_ASSUME_KERNEL=2.4.1
#source /usr/i386-glibc2.1-linux/bin/i386-glibc21-linux-env.sh
# +--------------------------+ 2
# | SETUP SEARCH PATH |
# +--------------------------+
PATH=$PATH:$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/home/oracle/j2sdk1.4.2_06:.
export PATH
# +--------------------------+
# | SETUP JAVA ENVIRONMENT |
# +--------------------------+
export JAVA_HOME=/home/oracle/j2sdk1.4.2_06
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.zip:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib:.
# +-------------+
# | "GREETINGS" |
# +-------------+
echo ".bash_profile executed"

第三步设置Linux内核参数:

以超级用户编辑/etc/rc.local文件,加入以下内容:
echo 100 256 100 100 > /proc/sys/kernel/sem
echo 2147483648 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
修改后,请重新启动电脑,并执行cat进行确认。
如:
# cat /proc/sys/kernel/sem
100 256 100 100
#

第四步创建用户和目录

1:
# groupadd dba
# groupadd oinstall
# useradd �Cc “Oracle software owner” �Cg oinstall �CG dba oracle
# passwd oracle
2. 创建Oracle目录:
本人是把Oracle安装在/opt目录下面。如果你的/opt不是一个单一的文件系统,请确保根文件系统“/”有足够的空间。
# mkdir /opt/oracle
# mkdir /opt/oracle/product
# mkdir /opt/oracle/product/9.2.0
# chown �CR oracle.oinstall /opt/oracle
# mkdir /var/opt/oracle
# chown oracle.dba /var/opt/oracle
# chmod 755 /var/opt/oracle

第五步解压文件

把下载得到的文件解压
# zcat ship_9204_linux_disk1.cpio.gz | cpio �Cidmv
# zcat ship_9204_linux_disk2.cpio.gz | cpio �Cidmv
# zcat ship_9204_linux_disk3.cpio.gz | cpio �Cidmv
把解压出来的Disk文件放进特定文件平并设置好权限
mkdir /oracle
mv Disk* /oracle
chown -R oracle:oinstall /oracle

第六步执行安装

cd /oracle/disk1
./runInstaller
然后一路NEXT,中间会被提示以ROOT运行两个脚本,照做可也。

第七步:去到最后AGENT会出错,不要管它,退出安装程序。

下载以下补丁并上传到服务器
p2617419_210_GENERIC.zip
[url]http://conrad2001.narod.ru/terek/p2617419_220_GENERIC.zip[/url]
和p3238244_9204_LINUX.zip
[url]http://conrad2001.narod.ru/terek/p3238244_9204_LINUX.zip[/url]

然后开始打补丁

切换到root的终端(保持了ORACLE_HOME, ORACLE_BASE的环境变量那个终端):
首先安装 opatch.
#cd /home/oracle
#unzip p2617419_210_GENERIC.zip
Archive: p2617419_210_GENERIC.zip
creating: OPatch/
creating: OPatch/docs/
inflating: Opatch/docs/FAQ
......
inflating: README.txt
#export PATH=$PATH:/home/oracle/Opatch:/sbin
#export ORACLE_HOME=/opt/oracle/product/9.2.0
(修改PATH时要要包括解压缩出来的Opatch 和 sbin目录)
# unzip p3238244_9204_LINUX.zip
# cd 3238244
# opatch apply
出现success的提示就全部安装成功.

补丁打完后,还要relinked一个.mk文件,切换到oracle用户窗口
cd $ORACLE_HOME/network/lib
make �Cf ins_oemagent.mk install
之后就可以启动Agent服务了
[oracle@orc1 ~]$ agentctl start

DBSNMP for Linux: Version 9.2.0.4.0 - Production on 20-OCT-2007 14:54:03

Copyright (c) 2003 Oracle Corporation.  All rights reserved.

Starting Oracle Intelligent Agent....
Agent started


大功告成



Trackback: [url]http://tb.blog.csdn.net/TrackBack.aspx?PostId=1836137[/url]

你可能感兴趣的:(oracle,linux,redhat,安装)