Linux 시스템 에서 Oacle 서 비 스 는 간단 한 설정 을 시작 합 니 다.

1786 단어 Oacle
Linux 시스템 에서 Oacle 서 비 스 는 간단 한 설정 을 시작 합 니 다.
1. 인 스 턴 스 시작 속성
  /etc/oratab  ,          N  Y
 :group114:/u01/app/oracle/product/10.2.0_1:Y

2. 자체 시작 서비스 스 크 립 트 작성
예 를 들 어 / etc / init. d / 다음 에 oradbstart 파일 을 만 들 수 있 습 니 다. 내용 은 다음 과 같 습 니 다.

#!/bin/bash
# whoami
# root
# chkconfig: 345 51 49
# description: starts the oracle dabase deamons
#
export ORACLE_BASE=/app/oracle10
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME_LISTNER=$ORACLE_HOME
export ORACLE_SID=orcl
ORA_OWNER=oracle
case "$1" in
start)
echo -n "Starting oracle 10g: "
su $ORA_OWNER -lc "$ORACLE_HOME/bin/dbstart" &
su $ORA_OWNER -lc "$ORACLE_HOME/bin/lsnrctl start"
# touch /var/lock/subsys/oradbstart
echo
;;

stop)
echo -n "shutting down oracle 10g: "
su $ORA_OWNER -lc "$ORACLE_HOME/bin/dbshut" &
su $ORA_OWNER -lc "$ORACLE_HOME/bin/lsnrctl stop"
# rm -f /var/lock/subsys/oradbstart
echo
;;

restart)
echo -n "restarting oracle 10g: "
$0 stop
$0 start
echo
;;
*)

echo "Usage: $0 {start|stop}"
exit 1
;;

esac
exit 0

환경 변수의 정의, sid 의 이름 등 을 주의 하 십시오.
3. 수정 / etc / init. d / oradbstart 파일 권한
chmod ugo+x /etc/init.d/oradbstart

4. 서비스 추가
chkconfig --add oradbstart

시작 단계 설정
chkconfig --level 35 oradbstart

마지막 으로 서버 를 다시 시작 하여 Oacle 이 서버 시작 에 따라 시작 할 수 있 는 지 테스트 합 니 다.

좋은 웹페이지 즐겨찾기