1-2. 리눅스 Centos 7, redhat 7 오라클 12c 버전 설치 방법
13. 리스너 설치
한글이 안나오기 떄문에 export LANG=C 로 치기
기본 셋팅으로 다음다음...설치 끝!
14. dbca 설치
dbca 설치다된 후에는
vi .bash_profile
export ORACLE_SID=orcl
15. 자동 실행 설정
오라클 계정
vi /etc/oratab
orcl:/usr/oracle/app/product/12.1.0/dbhome_1:N
-> 맨 뒤에 N 을 Y 로 변경
root 계정으로
vi /etc/rc.d/init.d/oracle 실행
#!/bin/bash
# oracle: Start/Stop Oracle Database 11g R2
#
# chkconfig: 345 90 10
# description: The Oracle Database is an Object-Relational Database Management System.
#
# processname: oracle
. /etc/rc.d/init.d/functions
LOCKFILE=/var/lock/subsys/oracle
ORACLE_HOME=/usr/oracle/app/product/12.1.0/dbhome_1
ORACLE_USER=oracle
case "$1" in
'start')
if [ -f $LOCKFILE ]; then
echo $0 already running.
exit 1
fi
echo -n $"Starting Oracle Database:"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl start dbconsole"
touch $LOCKFILE
;;
'stop')
if [ ! -f $LOCKFILE ]; then
echo $0 already stopping.
exit 1
fi
echo -n $"Stopping Oracle Database:"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
rm -f $LOCKFILE
;;
'restart')
$0 stop
$0 start
;;
'status')
if [ -f $LOCKFILE ]; then
echo $0 started.
else
echo $0 stopped.
fi
;;
*)
echo "Usage: $0 [start|stop|status]"
exit 1
esac
exit 0
# End of file
삽입후
sudo chmod 755 /etc/rc.d/init.d/oracle
sudo chkconfig --add oracle
sudo chkconfig oracle on
설정 끝!