成都创新互联网站制作重庆分公司

如何进行CentOSOracle测试运行使用root用户修改

这篇文章给大家介绍如何进行CentOS Oracle测试运行使用root用户修改,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

宜春网站建设公司成都创新互联公司,宜春网站设计制作,有大型网站制作公司丰富经验。已为宜春上千提供企业网站建设服务。企业网站搭建\成都外贸网站建设公司要多少钱,请找那个售后服务好的宜春做网站的公司定做!

Linux : CentOS-5Oracle: 10.2.0.1.0设置 Linux 上Oracle 自动启动 200807221、首先在/etc/rc.d/init.d/目录下配置CentOS Oracle的服务文件。su - rootvi oracledb将***的附件脚本贴入chmod 775 oracledb

2、使用root用户修改:[root@localhost init.d]# vi /etc/oratabcatlogdb:/oracle/product/10.2.0/db_1:Y将***的N改为Y

3、使用CentOS Oracle用户修改$ORACLE_HOME/bin/dbstart文件[root@localhost init.d]# su - oracle[oracle@localhost ~]$ cd $ORACLE_HOME/bin[oracle@localhost bin]$ vi dbstart找到 ORACLE_HOME_LISTNER 这行, 修改成:
ORACLE_HOME_LISTNER=/oracle/product/10.2.0/db_1或者直接修改成:ORACLE_HOME_LISTNER=$ORACLE_HOME

测试运行 dbshut, dbstart 看能否启动CentOS Oracle 服务及listener服务:[oracle@localhost bin]$ ps -ef|grep ora_[oracle@localhost bin]$ lsnrctl status

4、创建服务 chkconfig --add oracledbservice oracledb does not support chkconfig在脚本中以下两行必须存在# chkconfig: 345 99 10# description: script for the Oracle Instance, Listener 

[root@localhost ~]# chkconfig --list oracledb oracledb        0:off   1:off   2:off   3:on    4:on    5:on    6:off--附件oracledb 脚本
#!/bin/bash
#
# chkconfig: 345 99 10
# description: script for the Oracle Instance, Listener 
# /etc/init.d/oracledb
#

export ORACLE_HOME=/oracle/product/10.2.0/db_1
export ORACLE_SID=catlogdb
export PATH=$PATH:$ORACLE_HOME/bin
ORA_OWNR=oracle

# if the executables do not exist -- display error
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su $ORA_OWNR -c "$ORACLE_HOME/bin/dbstart"
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
touch /var/lock/oracle
su $ORA_OWNR -c $ORACLE_HOME/bin/emctl start dbconsole
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORA_OWNR -c $ORACLE_HOME/bin/dbshut
rm -f /var/lock/oracle
su $ORA_OWNR -c $ORACLE_HOME/bin/emctl stop dbconsole
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
****)
echo "Usage: `basename ` start|stop|restart|reload"
exit 1
esac
exit 0
CentOS Oracle备注说明# chkconfig: 345 99 10指出3,4,5级别启动这个服务,99是在相应的/etc/rc.d/rcN.d(N为前面指定的级别,这里是345)目录下生成的链接文件的序号(启动优先级别)S99oradbstart,10为在除前面指出的级别对应的/etc/rc.d/rcN.d(N为除345之外的级别)目录生成的链接文件的序号(服务停止的优先级别)K10oradbstart撤销服务的话:chkconfig --del CentOS Oracledb

关于如何进行CentOS Oracle测试运行使用root用户修改就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


当前名称:如何进行CentOSOracle测试运行使用root用户修改
文章网址:http://cxhlcq.com/article/jecphc.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部