---
title: Managing the PingAccess Linux service
description: Configure PingAccess to run as a Linux systemv or systemd service, or remove the PingAccess Linux service.
component: pingaccess
version: 9.0
page_id: pingaccess:installing_and_uninstalling_pingaccess:pa_managing_pa_as_a_linux_service
canonical_url: https://docs.pingidentity.com/pingaccess/9.0/installing_and_uninstalling_pingaccess/pa_managing_pa_as_a_linux_service.html
revdate: July 18, 2024
section_ids:
  about-this-task: About this task
  configuring-pingaccess-to-run-as-a-linux-systemv-service: Configuring PingAccess to run as a Linux systemv service
  about-this-task-2: About this task
  steps: Steps
  next-steps: Next steps
  configuring-pingaccess-to-run-as-a-linux-systemd-service: Configuring PingAccess to run as a Linux systemd service
  about-this-task-3: About this task
  steps-2: Steps
  removing-the-pingaccess-linux-service: Removing the PingAccess Linux service
  about-this-task-4: About this task
  steps-3: Steps
---

# Managing the PingAccess Linux service

Configure PingAccess to run as a Linux systemv or systemd service, or remove the PingAccess Linux service.

## About this task

Configuring PingAccess to run as a Linux systemv or systemd service causes it to start automatically when Linux starts.

|   |                                                                                             |
| - | ------------------------------------------------------------------------------------------- |
|   | To configure multiple instances of PingAccess as Linux services, see the Linux systemv tab. |

* Linux systemv

* Linux systemd

## Configuring PingAccess to run as a Linux systemv service

### About this task

|   |                                                                                                                                         |
| - | --------------------------------------------------------------------------------------------------------------------------------------- |
|   | The service script will only start if *\<JAVA\_HOME>* and *\<PA\_HOME>* are set and if the script can find the PingAccess license file. |

To configure multiple instances of PingAccess on a single host as Linux services, make the following modifications to the script for each service:

* Use a unique script name for each instance.

* Use a separate directory structure for each instance in the file system.

* Configure the following settings in the script file for each instance:

| Setting         | Description                                              |
| --------------- | -------------------------------------------------------- |
| *\<APPNAME>*    | A unique value for each instance.                        |
| *\<PA\_HOME>*   | The path to the PingAccess instance.                     |
| *\<JAVA\_HOME>* | The path to the Java installation folder.                |
| *\<USER>*       | Optional value for the username used to run the service. |

To configure PingAccess to run as a Linux systemv service:

### Steps

1. Copy the PingAccess script file from the `<PA_HOME>/sbin/linux/pingaccess` directory to the `/etc/init.d` directory.

2. **Optional:** Create a new user to run PingAccess.

3. Create the `/var/run/pingaccess` directory.

   |   |                                                                                             |
   | - | ------------------------------------------------------------------------------------------- |
   |   | Ensure that the user who will run the service has read and write permissions to the folder. |

4. Edit the `/etc/init.d/pingaccess` script file and set the values of the following variables at the beginning of the script:

   | Variable                  | Description                                                           |
   | ------------------------- | --------------------------------------------------------------------- |
   | `export <JAVA_HOME>=`     | Specify the Java install folder.                                      |
   | `export <PA_HOME>=`       | Specify the PingAccess install folder.                                |
   | `export USER=` (Optional) | Specify a username to run the service or leave empty for the default. |

5. To register the service, from the `/etc/init.d` directory, run:

   ```
   chkconfig --add pingaccess
   ```

6. To make the service script executable, run:

   ```
   chmod +x pingaccess
   ```

### Next steps

After registering, you can use the `service` command to control the PingAccess service. The available commands are:

* `start`

  Start the PingAccess service.

* `stop`

  Stop the PingAccess service.

* `restart`

  Restart the PingAccess service.

* `status`

  Show the status of the PingAccess service and the service process identifier (PID).

|   |                                                                                                        |
| - | ------------------------------------------------------------------------------------------------------ |
|   | The `service pingaccess status` command displays the current status of the running PingAccess service. |

## Configuring PingAccess to run as a Linux systemd service

### About this task

|   |                                                                                                                                         |
| - | --------------------------------------------------------------------------------------------------------------------------------------- |
|   | The service script will only start if *\<JAVA\_HOME>* and *\<PA\_HOME>* are set and if the script can find the PingAccess license file. |

To configure PingAccess to run as a Linux systemd service:

### Steps

1. Copy the configuration file from the `<PA_HOME>/sbin/linux/pingaccess.service` directory to the `/etc/systemd/system/pingaccess.service` directory.

2. In the `pingaccess.service` file, replace the following variables:

   * Replace *<${PA\_HOME}>* with the path to the PingAccess instance.

   * Replace *<${PA\_USER}>* with the username used to run the service.

   * Replace *<${PA\_JAVA\_HOME}>* with the path to the Java installation folder.

3. To allow read-write activity on the service, run:

   ```
   chmod 644 /etc/systemd/system/pingaccess.service
   ```

4. To load the systemd service, run:

   ```
   systemctl daemon-reload
   ```

5. To enable the service, run:

   ```
   systemctl enable pingaccess.service
   ```

6. To start the service, run:

   ```
   systemctl start pingaccess.service
   ```

## Removing the PingAccess Linux service

### About this task

|   |                                                         |
| - | ------------------------------------------------------- |
|   | You must run the following commands as the `root` user. |

To remove the PingAccess service from a Linux system:

### Steps

1. To stop the service, run the `/etc/init.d/pingaccess stop` command.

2. Run the `chkconfig --delete pingaccess` command.

3. **Optional:** Delete the `/etc/init.d/pingaccess` script.
