oracle9i 9.2.0.10,Oracle9i Release9.2.0.4的安装(转)

注:本文的安装环境为RedHat Linux AS3 Update4

1. 准备安装文件:

# gunzip ship_9204_linux_disk1.cpio.gz

ship_9204_linux_disk2.cpio.gz 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

2.配置Linux内核参数:

(1)配置系统在启动时内核所必须的参数:

修改内核配置文件 /etc/sysctl.conf :

kernel.shmall = 2097152

kernel.shmmax =

2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100

128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

(2)在 /etc/security/limits.conf 文件内添加下面的行(对文件进行限制):

oracle soft nofile

65536

oracle hard nofile 65536

oracle soft nproc 16384

oracle hard

nproc 16384

(3)在命令提示符下运行:

[root@clusting root]# sysctl -p

3. 安装开发包:

(1)安装开发所需的RPM包:

[root@clusting root]# rpm -q tcl setarch gcc

cpp compat-libstdc++ compat-libstdc++ compat-gcc-c++ compat-gcc compat-db

openmotif21 glibc-devel glibc-headers glibc-kernheaders binutils

(2)修改gcc 和 g++编译器的名称:

[root@clusting root]# mv /usr/bin/gcc

/usr/bin/gcc323

[root@clusting root]# mv /usr/bin/g++

/usr/bin/g++323

[root@clusting root]# ln -s /usr/bin/gcc296

/usr/bin/gcc

[root@clusting root]# ln -s /usr/bin/g++296 /usr/bin/g++

4.创建oracle用户组和必须的目录:

(1)添加用户组:

[root@clusting root]# groupadd dba

[root@clusting root]# groupadd oinstall

[root@clusting root]# groupadd

oper

[root@clusting root]# groupadd apache

(2)添加oracle用户:

[root@clusting root]# useradd -c "Oracle software owner" -g

oinstall -G dba oracle

(3)创建安装目录:

创建oracle软件的安装目录:

[root@clusting root]# mkdir -p

/oracle/product/9.2.0.4

[root@clusting root]# chown -R oracle.oinstall

/oracle

6.设置环境变量 :

切换到oracle用户身份,

[root@clusting root]# su - oracle

编辑 ~/.bash_profile 文件,添加下面这些行:

ORACLE_BASE=/oracle; export

ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/9.2.0.4; export

ORACLE_HOME

ORACLE_TERM=xterm; export

ORACLE_TERM

PATH=$ORACLE_HOME/bin:$PATH; export PATH

ORACLE_OWNER=oracle;

export ORACLE_OWNER

ORACLE_SID=zhang; export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib; export

LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib;

export CLASSPATH

LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL

TMP=/tmp; export

TMP

TMPDIR=$TMP; export TMPDIR

7.以root用户的身份,安装补丁程序3006854:

[root@clusting root]# unzip

p3006854_9204_LINUX.zip

[root@clusting root]# cd 3006854

[root@clusting

root]# sh rhel3_pre_install.sh

8.切换到oracle用户身份,并开始安装:

[root@clusting root]# su - oracle

[oracle@clusting oracle]$ export DISPLAY=192.168.100.5:0.0

(设置显示变量,在192.168.100.5上安装X服务器)

[root@clusting oracle]$ ./runInstaller

(开始安装)

以下是安装过程中的一些选项和注意事项:

(1)Unix Group Name: oinstall

(2) 当出现提示要求运行orainstRoot.sh时, 在另一个终端窗口中以root身份执行: /tmp/orainstRoot.sh

然后点击

[continue] 按钮 继续安装.

(3) 在 "Database Configuration"(即数据库设置)这一屏幕,选择 "Software Only"

,只安装软件。在安装完软件后再去创建数据库。

(4) 在最后一个屏幕,要求执行/oracle/product/9.2.0.4/root.sh

在另一个终端窗口中以root身份执行:

/oracle/product/9.2.0.4/root.sh

然后点击 [ok] 按钮 完成安装.

(5)点击"exit" 按钮退出安装程序,安装任务完成。

9.安装完成后的一些任务:

(1)使用工具dbca创建数据库实例zhang

[root@clusting oracle]$ dbca

在创建的过程中模版选择:"General Purpose"

在创建的过程中如果出现下列错误:

/oracle/product/9.2.0.4/bin/dbca: line 124: 12519 Killed

$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath

$CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS

则:

在另一个终端窗口中以root身份执行: touch /etc/rac_on (as root user)

(2) 设置系统启动时自动启动的实例:

实例被查创建之后,编辑 /etc/oratab 文件, 设置每个实例的 restart flag 为

'Y':

zhang:/u01/app/oracle/product/9.2.0.4:Y

10.使用netca工具来配置oracle的网络服务:

[root@clusting oracle]$ netca

11.创建一个启动脚本,用来启动Oracle:

(1)创建一个文件

/etc/init.d/oracle,该文件包含下面的内容:

#!/bin/sh

# description: Oracle auto

start-stop script.

# chkconfig: - 20 80

#

# Set ORA_HOME to be

equivalent to the $ORACLE_HOME

# from which you wish to execute dbstart and

dbshut;

#

# Set ORA_OWNER to the user id of the owner of the

# Oracle

database in

ORA_HOME.

ORA_HOME=/oracle/product/9.2.0.4

ORA_OWNER=oracle

if [ ! -f

$ORA_HOME/bin/dbstart ]

then

echo "Oracle startup: cannot

start"

exit

fi

case "$1" in

'start')

# Start the Oracle

databases:

# The following command assumes that the oracle login

# will

not prompt the user for any values

su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl

start"

su - $ORA_OWNER -c $ORA_HOME/bin/dbstart

echo "Start Oracle

Successful!"

;;

'stop')

# Stop the Oracle databases:

# The following

command assumes that the oracle login

# will not prompt the user for any

values

su - $ORA_OWNER -c $ORA_HOME/bin/dbshut

su - $ORA_OWNER -c

"$ORA_HOME/bin/lsnrctl stop"

echo "Shudown Oracle

Successful!"

;;

esac

(2)将其权限修改为 750:

chmod 750 /etc/init.d/oracle

(3)创建一个符号链接:

ln -s /etc/init.d/oracle /etc/rc0.d/K10oracle

ln -s

/etc/init.d/oracle /etc/rc3.d/S99oracle

(4)设置系统进入运行级别3和5时自动启动oracle服务:

chkconfig --level 35 oracle on

(5) 如果不能正常启动oracle服务器,则复制一个初始化文件:

cp $ORACLE_BASE/admin/$ORACLE_SID/pfile/initzhang.ora.72020070624

$ORACLE_HOME/dbs/initzhang.ora[@more@]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值