PingCentral

Configuring PingCentral to run as a Linux systemv service

Run PingCentral as a Linux systemv service that automatically starts when Linux starts.

Before you begin

Ensure that:

  • You are signed on to your system as a root user.

  • The <JAVA_HOME>JAVA_HOME path points to the Java Development Kit (JDK) software on your system. For example, /usr/lib/jvm/java-11-openjdk-11.0.5.10-0.e17_7.x86_64. To verify this information, run the echo $JAVA_HOME command.

  • The PINGCENTRAL_HOME path points to the folder extracted from the .zip archive in your installation directory. Ensure that this path doesn’t reside within a user’s home folder.

Steps

  1. Copy the pingcentral file from <PINGCENTRAL_HOME>/sbin/linux/pingcentral to /etc/init.d.

  2. Create a new user to run PingCentral. You might want to create a new user account for each service you run as a way of keeping your services separate, or associate the account with a running process.

  3. Create a new pingcentral folder in /var/run/pingcentral and ensure that the user who will run the service has read and write permissions to the folder.

  4. Access the pingcentral file in the /etc/init.d folder and set values for the following variables at the beginning of the script:

    • export <JAVA-HOME>: Specify the name and location of the Java installation folder.

    • export <PINGCENTRAL_HOME>: Specify the name and location of the PingCentral installation folder.

    • (Optional): export USER: Specify the name of the user who will run the service, if applicable.

  5. Register the service by running the chkconfig --add pingcentral command from the /etc/init.d folder.

  6. Make the service script executable by running the chmod +x pingcentral command.

    After registering the service, you can control it by running the pingcentral command from the /etc/init.d folder with the following options:

    • start: Starts the PingCentral service.

    • stop: Stops the PingCentral service.

    • restart: Restarts the PingCentral service.

    • status: Displays the status of the PingCentral service and the service process ID.

Removing the PingCentral systemv service

If you have privileges that allow you to install applications, you can remove the PingCentral systemd service.

Steps

  1. Sign on to the system as a root user.

    Option Description

    Stop the service

    Run the systemctl stop pingcentral command.

    Disable the service

    Run the systemctl disable pingcentral command.

  2. Delete the /etc/systemd/system/pingcentral.service script if it is no longer needed.