Managing DBB server with systemd

If your DBB server, also known as DBB web application, is installed on a Linux system with systemd, to enable easier system control with systemd, you can add the DBB server to the systemd configurations as follows.

Complete the following steps either as the root user or using sudo.

  1. Create the service file dbbweb.service for the DBB server.

    The following is an example of a service file. Under the [Service] section, you need to change the Environment and ExecStart parameters to point to your JAVA_HOME and the server executable in the dbbserver installation directory.

    [Unit]
    Description=DBB Web App Server
    
    [Service]
    Type=forking
    Environment="JAVA_HOME=/opt/ibm/java-s390x-80"
    ExecStart=/opt/ibm/dbbserver_v.r.m/wlp/bin/server start dbb
    ExecStop=/opt/ibm/dbbserver_v.r.m/wlp/bin/server stop dbb
    
    [Install]
    WantedBy=multi-user.target
  2. Make sure that the DBB server file is properly executable.

    The following is an example command. Modify the path based on your dbbserver installation directory.

    chmod +x /opt/ibm/dbbserver_v.r.m/wlp/bin/server

  3. Copy your dbbweb.service file into the /lib/systemd/system/ and /etc/systemd/system/ directories.

  4. Reload the systemd daemon by using the following command.

    systemctl daemon-reload

  5. Start the service by using dbbweb.service.

    Provided you set up the files correctly according to the previous steps, you should be able to start the service by using the following command.

    systemctl start dbbweb

  6. Enable the service dbbweb.service to start automatically after a server restart by using the following command.

    systemctl enable dbbweb

If you need to take down your DBB server for some reason, you can do so with the following command:

systemctl stop dbbweb