We're here to help!

Enable Dbvnet and Dbvserver auto start/stop using systemd for standby v7

Follow

Description

When using RHEL 7 or OEL 7 you may want to enable the use of systemd to automatically start or stop Dbvnet and Dbvserver on system restart.  

This document will provide you with the sample configuration files and commands which you can use to enable this for Standby Version 7.0

The assumption of this document is that you are familiar with systemd.


Steps Performed

Dbvnet:

Create a file in /usr/lib/systemd/system called dbvnet.service

Copy the text below to the dbvnet.service file.  You might need to adjust the path where Dbvisit Standby is installed - in the example below /usr/dbvisit is the DBVISIT_BASE location:

 

# /usr/lib/systemd/system/dbvnet.service
#
# Dbvisit Standby - Dbvnet systemd unit file:
# description: Dbvisit network infrastructure daemon. 

[Unit]
Description=Dbvisit Standby - Dbvnet
After=syslog.target network.target

[Service]
Type=simple
RemainAfterExit=yes
User=oracle
Group=oinstall
ExecStart=/usr/dbvisit/dbvnet/dbvnetd start >> /usr/dbvisit/dbvnet/log/dbvnet-systemd.log 2>&1 &
ExecStop=/usr/dbvisit/dbvnet/dbvnetd stop >> /usr/dbvisit/dbvnet/log/dbvnet-systemd.log 2>&1

[Install]
WantedBy=multi-user.target

 To enable the service:

# systemctl daemon-reload
# systemctl enable dbvnet.service

Then to start and stop you can use:

# systemctl start dbvnet.service
# systemctl stop dbvnet.service

 

Dbvserver:

Create a file in /usr/lib/systemd/system called dbvserver.service

Copy the text below to the dbvserver.service file.  You might need to adjust the path where Dbvisit Standby is installed - in the example below /usr/dbvisit is the DBVISIT_BASE location:

 


# /usr/lib/systemd/system/dbvserver.service # # Dbvisit Standby - Dbvserver systemd unit file: # description: Dbvisit webserver daemon. # [Unit] Description=Dbvisit Standby - Dbvserver After=syslog.target network.target [Service] Type=simple RemainAfterExit=yes User=oracle Group=oinstall ExecStart=/usr/dbvisit/dbvserver/dbvserverd start >> /usr/dbvisit/dbvserverd/log/dbvserverd-systemd.log 2>&1 & ExecStop=/usr/dbvisit/dbvserver/dbvserverd stop >> /usr/dbvisit/dbvserverd/log/dbvserverd-systemd.log 2>&1 [Install] WantedBy=multi-user.target

 

 To enable the service:

# systemctl daemon-reload
# systemctl enable dbvserver.service

Then to start and stop you can use:

# systemctl start dbvserver.service
# systemctl stop dbvserver.service

 

 

It is recommended that you test these steps in your development or test environment prior to implementing in production as some adjustments might be required to meet your environment.

 

 

Have more questions? Submit a request

Comments