1. For the installation process, refer to the article "installing Oracle Database 10 GB on Linux x86" on the Oracle Website:
Http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html
2. After the installation is complete, set to automatically start the Oracle service:Create or modify the/etc/oratab file:
Orcl:/u01/APP/Oracle/product/10.2.0/db_1: Y |
Here, orcl is the SID of the Oracle database,/u01/APP/Oracle/product/ 10.2.0 /Db_1 is the ORACLE_HOME of the Oracle database. y indicates that the Oracle database must be started when the system starts. Create an Automatic startup script for Oracle under/etc/rc. d/init. d:
#! /Bin/bash # chkconfig: 35 50 50 # Description: Oracle Database Server # source function library. /etc/init. d/functions # change the value of Oracle to the login name of the # Oracle owner at your site. # Oracle = Oracle # change the value of ORACLE_HOME to specify the correct Oracle Home # directory for your installation. # ORACLE_HOME =/u01/APP/Oracle/product/10.2.0/db_1 export oracleexport ORACLE_HOME R Etval = 0 prog = "oracle" Start () {echo-N $ "Starting $ prog:" If [$ UID-Ne 0]; then retval = 1 failure else Su-$ Oracle-c "LSNRCTL start" retval =$? If [$ retval-EQ 0]; then su-$ Oracle-c "dbstart" retval = $? FI; [$ retval-EQ 0] & Touch/var/lock/subsys/Oracle fi; echo return $ retval} STOP () {echo-N $ "Stopping $ prog: "If [$ UID-Ne 0]; then retval = 1 failure else Su-$ Oracle-c" dbshut "retval = $? If [$ retval-EQ 0]; then su-$ Oracle-c "LSNRCTL stop" retval =$? FI; [$ retval-EQ 0] & Rm-F/var/lock/subsys/Oracle fi; echo return $ retval} restart () {stop start} case "$1" in START) Start; stop) Stop; restart) restart; Status) status Oracle retval =$?; *) Echo $ "Usage: $0 {START | stop | status | restart}" retval = 1 esac exit $ retval |
Install service:
Chmod 755/etc/rc. d/init. d/oraclechkconfig -- add Oracle |