- 论坛徽章:
- 0
|
![]()
文件:
Install Ora9204 on RedHat LinuxAS3_5.pdf
大小:
2869KB
下载:
下载
主要步骤参考以上文档,但首先要下载j2sdk到
www.sun.com
上下载,然后进行安装改可执行权限。启动oracle 企业管理器运行如下命令oemapp console,安装使用emca命令,然后运行oemctl start oms进行安装。加启动脚本修改vi /etc/oratab 把N改成Y编辑启动脚本加入到启动列表用如下命令 chkconfig --level 35 (+编辑的文件名) on即可。
需要复制一个初始化文件:
cp /opt/oracle/admin/oradb/pfile/init.ora.* /opt/oracle/product/9.2.0/dbs/initoradb.ora
启动脚本如下:
#!/bin/bash
#start and stop the oracle instance
# chkconfig –level 5 --add ora9i
#chkconfig: 345 91 19
# description: starts the oracle listener and instance
export ORACLE_HOME="/opt/oracle/product/9.2.0"
export PATH=$PATH:$ORACLE_HOME/binORACLE_HOME/Apache/Apache/bin
export ORACLE_OWNER="oracle"
export ORACLE_SID=oradb
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "oracle startup:cannot start"
exit 1
fi
case "$1" in
start)
#startup the listener and instance
echo -n "oracle startup: "
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart
touch /var/lock/subsys/oracle
echo "finished"
;;
stop)
# stop listener, apache and database
echo -n "oracle shutdown:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle
echo "finished"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: ora9i [start|stop|reload|restart]"
exit 1
esac
exit 0
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32774/showart_272252.html |
|