티스토리 뷰
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
- 물리디스크
- postgresql11
- ld 옵션
- virtualbox
- install
- mirrorlist
- pf.anchors
- aix compile
- Ignoring CMAKE_OSX_SYSROOT value
- Repository
- firewall-cmd service
- CLion
- lvremove
- vgcreate
- yum
- physicaldisk
- 센트6
- fielddata
- linux
- 파티션 추가
- _status
- lvm 늘리기
- _stats
- update
- centos7
- aix ld
- pfctl
- noipath
- CMAKE_OSX_SYSROOT
- CentOS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |