Deploy oracle 11g R2 on CentOS 6.3 x86-64 (2)
I have introduced how to deply oracle 11g R2 and start it in article https://www.roamway.com/?p=9&preview=true
Then I decide to add oracle to system service and set startup automatically
1. switch to root user,editing oracle startpu script, as shown in the following
cd /etc/init.d
vim oracle
chmod +x oracle
2. Add oracle to system service, making it start automatically
3. In order to operate oracle more smoothly,we can set environment variable in global variable.
vim /etc/profile
Attach following content to the end of profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_HOME=oracle
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export PATH=$PATH:ORACLE_HOME/bin
|
save and exit
vim /etc/oratab
Modify the letter “X” to “Y”,as shown in the following figure:
Save and exit
switch to the directory “/opt/oracle/product/11.2.0/dbhome_1/bin/”
source /etc/profile
cd /opt/oracle/product/11.2.0/dbhome_1/bin/
source /etc/profile
4. Login oracle from local
cd /opt/oracle/product/11.2.0/dbhome_1/bin/
./sqlplus sys AS SYSDBA
5. Log off root user,login system by oracle user
cd /opt/oracle/product/11.2.0/dbhome_1/bin/
./sqlplus sys AS SYSDBA
So far we have finished installing oracle 11gR2 in CentOS 6.3 x86_64