티스토리 뷰
service 등록
[root@oracle11g ~]# /etc/rc.d/init.d/oradb
#!/bin/sh # # chkconfig: 345 99 99 # description: oracle Database # processname: $ORA_HOME/bin/dbstart # config: # pidfile: # # source function library . /etc/rc.d/init.d/functions # pull in sysconfig settings RETVAL=0 prog="Oracle Database" lock_file="oradb" ORA_OWNER="oracle" ORA_HOME=`su - $ORA_OWNER -c env | grep ORACLE_HOME | awk -F'=' '{print $2}'` # Some functions to make the below more readable start() { echo -n "Starting ${prog}:" su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" && success || failure touch /var/lock/subsys/$lock_file RETVAL=$? echo return $RETVAL } stop() { echo -n "Stopping ${prog}:" su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" && success || failure rm -f /var/lock/subsys/$lock_file RETVAL=$? echo return $RETVAL } status() { echo -n "Status ${prog}:" ls /var/lock/subsys/$lock_file && success || failure RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; status) status ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" RETVAL=1 esac exit $RETVAL
|
[root@oracle11g ~]# /etc/rc.d/init.d/oralsnr
#!/bin/sh # # chkconfig: 345 99 99 # description: oracle listner # processname: $ORA_HOME/bin/lsnrctl # config: # pidfile: # # source function library . /etc/rc.d/init.d/functions # pull in sysconfig settings RETVAL=0 prog="Oracle Listner" lock_file="oralsnr" ORA_OWNER="oracle" ORA_HOME=`su - $ORA_OWNER -c env | grep ORACLE_HOME | awk -F'=' '{print $2}'` # Some functions to make the below more readable start() { echo -n "Starting ${prog}:" su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" && success || failure touch /var/lock/subsys/$lock_file RETVAL=$? echo return $RETVAL } stop() { echo -n "Stopping ${prog}:" su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" && success || failure rm -f /var/lock/subsys/$lock_file RETVAL=$? echo return $RETVAL } status() { echo -n "Status ${prog}:" su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl status" RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; status) status ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" RETVAL=1 esac exit $RETVAL |
'Database > Oracle' 카테고리의 다른 글
Install Oracle in silent mode 12C Release 2 (12.2) on OEL7 (0) | 2017.08.16 |
---|---|
Install Oracle in silent mode 12C Release 1 (12.1) on OEL6 (0) | 2017.08.14 |
Install Oracle in silent mode 11G Release 2 (11.2) on OEL5 (0) | 2017.05.22 |
계정 및 테이블 스페이스 생성 (0) | 2017.05.16 |
- Total
- Today
- Yesterday
- CentOS
- Repository
- install
- aix compile
- CMAKE_OSX_SYSROOT
- lvm 늘리기
- postgresql11
- physicaldisk
- linux
- _stats
- vgcreate
- pfctl
- update
- 파티션 추가
- firewall-cmd service
- CLion
- yum
- 센트6
- 물리디스크
- lvremove
- centos7
- mirrorlist
- pf.anchors
- _status
- Ignoring CMAKE_OSX_SYSROOT value
- virtualbox
- fielddata
- ld 옵션
- noipath
- aix ld
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |