0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

systemdスクリプトをWebLogicサービス化

Last updated at Posted at 2025-03-08

つくってみた。
スクリプトを修正したら
systemctl daemon-reloadを実行しないと変更が反映されない。

/etc/systemd/system/nodemanager.service
## create new file /etc/systemd/system/nodemanager.service for nodemanager, 
## then systemctl daemon-reload
[Unit]
Description=Controls Weblogic NodeManager Service
After=network.target sshd.service

[Service]
#ExceStartがフォアグラウンドで動作するコマンドの場合にsimple指定
Type=simple
ExecStart=<domain_home>/bin/startNodeManager.sh
ExecStop =<domain_home>/bin/stopNodeManager.sh
#oracle:oinstallユーザとして実行
User=oracle
Group=oinstall
#異常終了しても再起動しない
Restart=no
#ExceStartが300秒待っても実行できなかったらタイムアウトと判定
#(ExecStartコマンドはフォアグラウンド動作なのでここには影響しない)
TimeoutStartSec=300
#ExceStopが300秒待っても終了しない場合はタイムアウト判定->SIGTERM
TimeoutStopSec=300
KillMode=process
#StandardOutput=append:/var/log/nm.out
#StandardError=inherit

[Install]
WantedBy=default.target
/etc/systemd/system/weblogic.service
## create new file /etc/systemd/system/adminserver.service for adminserver, 
## then systemctl daemon-reload
[Unit]
Description=Controls Weblogic AdminServer Service
After=network.target sshd.service nodemanager.service
Requires=nodemanager.service

[Service]
#ExceStartがフォアグラウンドで動作するコマンドの場合にsimple指定
Type=simple
ExecStart=<domain_home>/bin/startWebLogic.sh
ExecStop =<domain_home>/bin/stopWebLogic.sh
#oracle:oinstallユーザとして実行
User=oracle
Group=oinstall
#異常終了しても再起動しない
Restart=no
#ExceStartが1200秒待っても実行できなかったらタイムアウトと判定
TimeoutStartSec=1200
#ExceStopが1200秒待っても終了しない場合はタイムアウト判定->SIGTERM
TimeoutStopSec=1200
KillMode=process
#StandardOutput=append:/var/log/webloigc-admin.out
#StandardError=inherit

[Install]
WantedBy=multi-user.target
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?