Create the Oracle service file under the/etc/init.d/directory with root user Cd/etc/init.dvi oracle11g Add the following #!/bin/bash# chkconfig:345 10# Description: Startup Script. For Oracle databasesexport oracle_base=/u01/app/oracleexport oracle_home= $ORACLE _base/product/10.2.0 /db_1;export oracle_owner=oracleexport oracle_sid=orclexport ld_libbary_path= $ORACLE _home/lib:/usr/lib64:/usr/lib :/usr/local/lib:/usr/local/lib64;export path= $PATH: $ORACLE _home/bin: $DYLD _library_path: $LD _library_pathexport Nls_lang=american_china. Al32utf8export display=:0.0su-oracle <<eoflsnrctl startemctl start dbconsolesqlplus/nolog<<eosconnect/ As Sysdbastartupquit Save the file, grant the executable permission chmod a+x oracle11g Add service/sbin/chkconfig--add oracle11g see if the service was added successfully:/sbin/chkconfig-- List oracle11goracle11g 0:off 1:off 2:off 3:on 4:on 5:on 6:off When you restart Linux, you see the boot entry oracle11g OK, and the system starts successfully to check if the Oracle process starts automatically.
Linux Setup Oracle Auto-start