RHEL7 Oracle開機啟動/關閉設定方式:
使用Systemctl start/stop dbora
#vi /usr/lib/systemd/system/dbora.service
###########Start
[Unit]
Description=The Oracle Database Service
After=network.target
[Service]
Type=forking
# Type=oneshot
RemainAfterExit=yes
KillMode=none
# Set this to something larger if it has an impact
TimeoutStopSec=5min
#Replace Oracle software owner details here
User=oraprod2
Group=dba
# Please use absolute path here instead of the $ORACLE_HOME variable
ExecStart=/u01/app/oracle/product/19.3.0/dbhome_1/bin/dbstart /u01/app/oracle/product/19.3.0/dbhome_1
ExecStop=/u01/app/oracle/product/19.3.0/dbhome_1/bin/dbshut /u01/app/oracle/product/19.3.0/dbhome_1
Restart=no
[Install]
# Puts wants directive for the other units in the relationship
WantedBy=default.target
###########END
重新註冊Service
systemctl enable dbora.service
systemctl daemon-reload
systemctl start dbora.service
Reference:
0 意見:
張貼留言