Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to run a CentOS Oracle test using root user modification

Shulou Source: shulou.com Published: 2022-06-01 07:15:34 10月19日 Update

This article introduces you how to run CentOS Oracle test using root user modification, the content is very detailed, interested friends can refer to, I hope to help you.

Linux: CentOS-5Oracle: 10.2.0.1.0 Set up Oracle auto-startup on Linux 200807221. First configure CentOS Oracle service files in the/etc/rc.d/init.d/directory. su - rootvi oracledb Paste *** attachment script into chmod 775 oracledb

2. Use root user to modify: [root@localhost init.d]# vi /etc/oratabcatlogdb:/oracle/product/10.2.0/db_1:Y Change N of *** to Y

3. Use CentOS Oracle user to modify $ORACLE_HOME/bin/dbstart file [root@localhost init.d]# su - oracle[oracle@localhost ~]$ cd $ORACLE_HOME/bin[oracle@localhost bin]$ vi dbstart to find the line ORACLE_HOME_LISTNER, modify it to:

ORACLE_HOME_LISTNER=/oracle/product/10.2.0/db_1 or directly modified to: ORACLE_HOME_LISTNER=$ORACLE_HOME

Test run dbshut, dbstart to see if CentOS Oracle service and listener service can be started: [oracle@localhost bin]$ ps -ef| grep ora_[oracle@localhost bin]$ lsnrctl status

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--Attachments oracledb script

#!/ 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 Remarks Description # chkconfig: 345 99 10 indicates that the service is started at levels 3, 4, and 5, 99 is in the corresponding/etc/rc.d/rcN.d (N is the level specified above, here 345) The serial number of the link file generated under the directory (startup priority)S99oradbstart, 10 is the serial number of the link file generated under the directory/etc/rc.d/rcN.d(N is the level other than 345)(service stop priority)K10 oradbstartIf the service is revoked: chkconfig --del CentOS Oracledb

About how to run CentOS Oracle test using root user modification to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Tags: Services levels users files tests runs directories scripts content serial numbers more links attachments help generation good interest notes guys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Shulou Information Microsoft OPPO Reno