Centos6.4 Oracle11g random start and close configuration steps: 1. Modify the dbstart and dbshut scripts $ vi $ ORACLE_HOME/bin/dbstart to change ORACLE_HOME_LISTNER = $1 to ORACLE_HOME_LISTNER = $ ORACLE_HOME $ vi $ ORACLE_HOME/bin/dbshut to ORACLE_HOME_LISTNER = $1 = $ ORACLE_HOME 2. Modify/etc/oratab $ su-root # vi/etc/oratab and find # $ ORACLE_HOME with the value of $ ORACLE_HOME, replace $ SID with the value of $ SID variable $ SID: $ ORACLE_HOME: N with $ SID: $ ORACLE_HOME: Y 3. Edit the startup close script # vi/etc/rc. d/init. d/oracle #! /Bin/bash # chkconfig: 234 61 61 # description: Oracle 11g AutoRun Service #/etc/rc. d/init. d/oracle case "$1" in start) # starts oracle listener and instance echo "Starting Oracle Database: "su-oracle-lc" lsnrctl start "su-oracle-lc dbstart; stop) # shutdown oracle listner and instance echo" Shuting down Oracle Database: "su-oracle-lc" lsnrctl stop "su-oracle-lc dbshut; reload | restar T) $0 stop $0 start; *) echo "Usage: {start | stop | reload | restart} "exit 1 esacexit 0 4. Check whether the script is correctly executed # cd/etc/rc. d/init. d #. /oracle start #. /oracle stop 5. Execute the following command: # chmod 750/etc/rc. d/init. d/oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc2.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc3.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc4.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc0.d/K61orac Le # ln-s/etc/rc. d/init. d/oracle/etc/rc6.d/K61oracle # chkconfig -- level 234 oracle on # chkconfig -- add oracle note: When chkconfig is executed, you need to add at least two lines of comments to the script (step 1). The first line tells chkconfig the running level of the service, and the second line adds a brief description about the service. 5. Restart the linux operating system and check whether oracle is automatically started and restarted. You can see the relevant information on the system startup page.