Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed tutorial on installing Oracle 11g based on RHEL 6.5 (7) & mdash;— configuration Oracle self-startup

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

7 configure Oracle self-startup

Modify the orcl:/u01/app/oracle/product/11.2.0/db_1:N in the / etc/oratab file to

Orcl:/u01/app/oracle/product/11.2.0/db_1:Y

[root@oracle ~] # vi / etc/oratab

Orcl:/u01/app/oracle/product/11.2.0/db_1:Y

[root@oracle ~] # su-oracle

[oracle@oracle ~] $cd $ORACLE_HOME/bin

Modify the ORACLE_HOME_LISTNER=$1 in the dbstart file to

ORACLE_HOME_LISTNER=$ORACLE_HOME

[oracle@oracle bin] $vi dbstart

ORACLE_HOME_LISTNER=$ORACLE_HOME

Modify the ORACLE_HOME_LISTNER=$1 in the dbshut file to

ORACLE_HOME_LISTNER=$ORACLE_HOME

[oracle@oracle bin] $vi dbshut

ORACLE_HOME_LISTNER=$ORACLE_HOME

[oracle@oracle bin] $. / dbshut

Processing Database instance "orcl": log file / u01/app/oracle/product/11.2.0/db_1/shutdown.log

[oracle@oracle bin] $. / dbstart

Processing Database instance "orcl": log file / u01/app/oracle/product/11.2.0/db_1/startup.log

[oracle@oracle bin] $exit

Logout

[root@oracle ~] # cd / etc/rc.d/init.d/

[root@oracle init.d] # vi oracle

#! / bin/bash

# chkconfig: 345 99 10

# description: Startup Script for Oracle Databases

# / etc/rc.d/init.d/oracle

Export ORACLE_BASE=/u01/app

Export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/db_1

Export ORACLE_SID=orcl

Export PATH=$PATH:$HOME/bin:$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"

# su-$ORA_OWNR-c "$ORACLE_HOME/bin/isqlplusctrl start"

Echo "OK"

Stop)

# Oracle listener and instance shutdown

Echo-n "Shutdown Oracle:"

Su-$ORA_OWNR-c "$ORACLE_HOME/bin/emctl stop dbconsole"

# su-$ORA_OWNR-c "$ORACLE_HOME/bin/isqlplusctrl stop"

Su-$ORA_OWNR-c "$ORACLE_HOME/bin/dbshut"

Su-$ORA_OWNR-c "$ORACLE_HOME/bin/lsnrctl stop"

Rm-f / var/lock/Oracle

Echo "OK"

Reload | restart)

$0 stop

$0 start

*)

Echo "Usage: `basename $0` start | stop | restart | reload"

Exit 1

Esac

Exit 0

[root@oracle init.d] # ls-l

Total 392

-rwxr-xr-x. 1 root root 1288 Aug 14 2013 abrt-ccpp

-rwxr-xr-x. 1 root root 1628 Aug 14 2013 abrtd

-rwxr-xr-x. 1 root root 1642 Aug 14 2013 abrt-oops

-rwxr-xr-x. 1 root root 1725 Dec 3 2009 acpid

-rwxr-xr-x. 1 root root 2062 Jan 20 2012 atd

-rwxr-xr-x. 1 root root 3378 Mar 14 2012 auditd

-rwxr-xr-x. 1 root root 4043 Oct 30 2013 autofs

-r-xr-xr-x. 1 root root 1340 Oct 30 2013 blk-availability

-rwxr-xr-x. 1 root root 710 Jun 30 2010 bluetooth

-rwxr-xr-x. 1 root root 2094 Jan 12 2013 certmonger

-rwxr-xr-x. 1 root root 11355 Aug 2 2013 cpuspeed

-rwxr-xr-x. 1 root root 2826 Sep 12 2013 crond

-rwxr-xr-x. 1 root root 3034 Aug 7 2013 cups

-rwxr-xr-x. 1 root root 1702 Jan 4 2013 dnsmasq

-rwxr-xr-x. 1 root root 3245 Jul 9 2013 firstboot

-rw-r--r--. 1 root root 18586 Oct 10 2013 functions

-rwxr-xr-x. 1 root root 1801 Apr 1 2011 haldaemon

-rwxr-xr-x. 1 root root 5866 Oct 10 2013 halt

-rwxr-xr-x. 1 root root 2001 Aug 2 2013 htcacheclean

-rwxr-xr-x. 1 root root 3371 Aug 2 2013 httpd

-rwxr-xr-x. 1 root root 10804 Sep 17 2013 ip6tables

-rwxr-xr-x. 1 root root 10688 Sep 17 2013 iptables

-rwxr-xr-x. 1 root root 1938 Aug 23 2013 irqbalance

-rwxr-xr-x. 1 root root 18133 Oct 22 2013 kdump

-rwxr-xr-x. 1 root root 652 Oct 10 2013 killall

-r-xr-xr-x. 1 root root 2134 Oct 30 2013 lvm2-lvmetad

-r-xr-xr-x. 1 root root 2665 Oct 30 2013 lvm2-monitor

-rwxr-xr-x. 1 root root 2571 Oct 11 2013 mdmonitor

-rwxr-xr-x. 1 root root 2200 Sep 7 2012 messagebus

-rwxr-xr-x. 1 root root 2989 Oct 10 2013 netconsole

-rwxr-xr-x. 1 root root 5428 Oct 10 2013 netfs

-rwxr-xr-x. 1 root root 6334 Oct 10 2013 network

-rwxr-xr-x. 1 root root 2205 Oct 23 2013 NetworkManager

-rwxr-xr-x. 1 root root 6364 Oct 10 2013 nfs

-rwxr-xr-x. 1 root root 3526 Oct 10 2013 nfslock

-rwxr-xr-x. 1 root root 1923 Jul 15 2013 ntpd

-rwxr-xr-x. 1 root root 2043 Jul 15 2013 ntpdate

-rwxr-xr-x. 1 root root 2261 Feb 25 2011 oddjobd

-rw-r--r-- 1 root root 1405 May 15 07:14 oracle

-rwxr-xr-x. 1 root root 2023 Feb 1 2012 portreserve

-rwxr-xr-x. 1 root root 3852 May 13 2011 postfix

-rwxr-xr-x. 1 root root 1556 Jul 10 2012 psacct

-rwxr-xr-x. 1 root root 2034 Jun 13 2013 quota_nld

-rwxr-xr-x. 1 root root 1513 Sep 17 2013 rdisc

-rwxr-xr-x. 1 root root 1822 Oct 15 2013 restorecond

-rwxr-xr-x. 1 root root 2898 Mar 20 2010 rhnsd

-rwxr-xr-x. 1 root root 1215 Oct 17 2013 rhsmcertd

-rwxr-xr-x. 1 root root 1808 Dec 3 2011 rngd

-rwxr-xr-x. 1 root root 2073 Oct 23 2012 rpcbind

-rwxr-xr-x. 1 root root 2518 Oct 10 2013 rpcgssd

-rwxr-xr-x. 1 root root 2305 Oct 10 2013 rpcidmapd

-rwxr-xr-x. 1 root root 2464 Oct 10 2013 rpcsvcgssd

-rwxr-xr-x. 1 root root 2011 Aug 15 2013 rsyslog

-rwxr-xr-x. 1 root root 1698 Oct 15 2013 sandbox

-rwxr-xr-x. 1 root root 2056 Nov 20 2012 saslauthd

-rwxr-xr-x. 1 root root 647 Oct 10 2013 single

-rwxr-xr-x. 1 root root 3002 Sep 26 2012 smartd

-rwxr-xr-x. 1 root root 2162 Sep 11 2013 snmpd

-rwxr-xr-x. 1 root root 1738 Sep 11 2013 snmptrapd

-rwxr-xr-x. 1 root root 2472 Sep 10 2013 spice-vdagentd

-rwxr-xr-x. 1 root root 4534 Sep 30 2013 sshd

-rwxr-xr-x. 1 root root 2712 Oct 23 2013 sssd

-rwxr-xr-x. 1 root root 1144 Sep 17 2013 sysstat

-rwxr-xr-x. 1 root root 2294 Oct 17 2013 udev-post

-rwxr-xr-x. 1 root root 40189 May 14 17:10 vmware-tools

-rwxr-xr-x. 1 root root 1674 Aug 24 2012 wdaemon

-rwxr-xr-x. 1 root root 1608 Oct 11 2013 winbind

-rwxr-xr-x. 1 root root 1866 Sep 7 2012 wpa_supplicant

-rwxr-xr-x. 1 root root 4799 Oct 10 2012 ypbind

[root@oracle init.d] # chmod + x oracle

[root@oracle init.d] # ls-l | grep oracle

-rwxr-xr-x 1 root root 1405 May 15 07:14 oracle

[root@oracle init.d] # chkconfig-- level 2345 oracle on

[root@oracle init.d] #. / oracle

Usage: oracle start | stop | restart | reload

[root@oracle init.d] # cd / etc/rc.d/rc5.d/

[root@oracle rc5.d] # ls-l | grep oracle

Lrwxrwxrwx 1 root root 16 May 15 07:18 S99oracle->.. / init.d/oracle

[root@oracle rc5.d] # reboot

Broadcast message from root@oracle.kely.com

(/ dev/pts/0) at 7:21.

The system is going down for reboot NOW!

[root@oracle ~] # su-oracle

[oracle@oracle ~] $ps-efw | grep ora_

Oracle 2056 1 0 07:21? 00:00:00 ora_pmon_orcl

Oracle 2058 1 0 07:21? 00:00:00 ora_vktm_orcl

Oracle 2062 1 0 07:21? 00:00:00 ora_gen0_orcl

Oracle 2064 1 0 07:21? 00:00:00 ora_diag_orcl

Oracle 2066 1 0 07:21? 00:00:00 ora_dbrm_orcl

Oracle 2068 1 0 07:21? 00:00:00 ora_psp0_orcl

Oracle 2070 1 0 07:21? 00:00:00 ora_dia0_orcl

Oracle 2072 1 0 07:21? 00:00:00 ora_mman_orcl

Oracle 2074 1 0 07:21? 00:00:00 ora_dbw0_orcl

Oracle 2076 1 0 07:21? 00:00:00 ora_lgwr_orcl

Oracle 2078 1 0 07:21? 00:00:00 ora_ckpt_orcl

Oracle 2080 1 0 07:21? 00:00:00 ora_smon_orcl

Oracle 2082 1 0 07:21? 00:00:00 ora_reco_orcl

Oracle 2084 1 0 07:21? 00:00:00 ora_mmon_orcl

Oracle 2086 1 0 07:21? 00:00:00 ora_mmnl_orcl

Oracle 2088 1 0 07:21? 00:00:00 ora_d000_orcl

Oracle 2090 1 0 07:21? 00:00:00 ora_s000_orcl

Oracle 2133 1 0 07:21? 00:00:00 ora_p000_orcl

Oracle 2135 1 0 07:21? 00:00:00 ora_p001_orcl

Oracle 2137 1 0 07:22? 00:00:00 ora_qmnc_orcl

Oracle 2666 1 0 07:22? 00:00:00 ora_cjq0_orcl

Oracle 2728 1 0 07:22? 00:00:00 ora_q000_orcl

Oracle 2730 1 0 07:22? 00:00:00 ora_q001_orcl

Oracle 3742 1 1 07:26? 00:00:00 ora_j000_orcl

Oracle 3744 1 0 07:26? 00:00:00 ora_j001_orcl

Oracle 3759 3717 0 07:26 pts/0 00:00:00 grep ora_

[oracle@oracle ~] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0-Production on 15-MAY-2014 07:26:33

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=oracle.kely.com) (PORT=1521)

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0-Production

Start Date 15-MAY-2014 07:21:46

Uptime 0 days 0 hr. 4 min. 48 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File / u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=oracle) (PORT=1521))

Services Summary...

Service "orcl" has 1 instance (s).

Instance "orcl", status READY, has 1 handler (s) for this service...

Service "orclXDB" has 1 instance (s).

Instance "orcl", status READY, has 1 handler (s) for this service...

The command completed successfully

[oracle@oracle ~] $ps-efw | grep LISTEN | grep-v grep

Oracle 1940 1 0 07:21? 00:00:00 / u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER-inherit

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report