Systemctl for Weblogic in RHEL7

If you have existing start/stop scripts that can start/stop all admin and managed servers in one shot, below would be the configuration for systemctl:

1) Prepare file /etc/systemd/system/wls_myservice.service

[Unit]
Description=Weblogic Startup
After=network.target

[Service]
Type=forking
User=weblogic
Group=weblogic
TimeoutSec=300
ExecStart=/appl/myservice/bin/start.sh
ExecStop=/appl/myservice/bin/stop.sh
Restart=no

[Install]
WantedBy=multi-user.target

 

2) Enable the service from systemctl
systemctl enable wls_myservice
systemctl daemon-reload

 

3) Test
systemctl start wls_myservice
systemctl status wls_myservice -l

systemctl stop wls_myservice
systemctl status wls_myservice -l

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s