---
title: Installing the PingFederate service on Linux manually
description: Generate a license key.
component: pingfederate
version: 13.1
page_id: pingfederate:installing_and_uninstalling_pingfederate:pf_install_pf_service_on_linux_manually
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/installing_and_uninstalling_pingfederate/pf_install_pf_service_on_linux_manually.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: February 2, 2023
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
  result: Result:
  example: Example:
  example-2: Example:
  next-steps: Next steps
  related-links: Related links
---

# Installing the PingFederate service on Linux manually

## Before you begin

* [Generate a license key](https://docs.pingidentity.com/pingfederate/latest/administrators_reference_guide/pf_generate_new_license_key.html).

* Ensure you are signed on to your system with sufficient privileges to install and run an application.

* Verify that you have installed the Java Runtime Environment (JRE) and that you have set the required environment variables correctly. For more information, see [Installing Java](pf_install_java.html) in the PingFederate Server documentation.

## About this task

If you have not installed PingFederate on Linux using the distribution `.zip` archive, you can install it manually. To install the PingFederate service on Linux manually:

## Steps

1. Download the distribution `.zip` archive from the Ping Identity [Downloads](https://www.pingidentity.com/en/resources/downloads/pingfederate.html) website.

2. Extract the file into an installation directory, `<pf_install>`.

3. Create a new local user account for the PingFederate service, such as `pingfederate`.

   |   |                                                      |
   | - | ---------------------------------------------------- |
   |   | The service account is referred to as *\<pf\_user>*. |

4. Change the ownership of the PingFederate installation directory `<pf_install>` and update the read-write permissions by running the following commands:

   ```
   chown -R <pf_user>  <pf_install>
   chmod -R 775  <pf_install>
   ```

5. If the operating system supports systemd, install the PingFederate unit file:

   1. Edit the `<pf_install>/pingfederate/sbin/linux/pingfederate.service` systemd unit file.

      Replace the following variables with information from your environment:

      * PF\_VERSION

        The version of PingFederate.

      * PF\_USER

        The local user account for the PingFederate service.

      * PF\_HOME

        The `<pf_install>/pingfederate` directory.For example, if `<pf_install>` is `/opt/identity.fed`, replace `${PF_HOME}` with `/opt/identity.fed/pingfederate`.

      * PF\_JAVA\_HOME

        The *\<JAVA\_HOME>* environment variable value (a directory).

   2. Copy the `pingfederate.service` file to the systemd unit files directory, for example, `/etc/systemd/system`.

      |   |                                                                                                                                                                                                         |
      | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      |   | Depending on the operating system, the exact location might vary. Consult your system administrators as needed. The rest of the step assumes `/etc/systemd/system` is the systemd unit files directory. |

   3. Run the following command to update the read-write permissions of the `pingfederate.service` systemd unit file:

      ```
      chmod 664 /etc/systemd/system/pingfederate.service
      ```

   4. Run the following commands to load the new system configuration changes and start the PingFederate service:

      ```
      systemctl daemon-reload ;\
      systemctl start pingfederate
      ```

   5. Run the following commands to configure the PingFederate service to start automatically as the server boots:

      ```
      systemctl enable pingfederate ;\
      systemctl daemon-reload ;\
      systemctl restart pingfederate
      ```

      ### Result:

      After setting up the PingFederate systemd unit file, you can run the following `systemctl` command to manage the PingFederate service:

      ```
      systemctl start pingfederate
      systemctl stop pingfederate
      systemctl restart pingfederate
      systemctl status pingfederate
      ```

6. If the operating system supports SysV initialization, follow these steps to install the PingFederate script.

   1. Edit the `<pf_install>/pingfederate/sbin/linux/pingfederate` script.

      Replace the following statements with information from your environment:

      * PF\_HOME=*$PF\_HOME*

        Replace *$PF\_HOME* with the `<pf_install>/pingfederate` directory.For example, if `<pf_install>` is `/opt/identity.fed`, replace *$PF\_HOME* with `/opt/identity.fed/pingfederate`.

      * USER="*pingfederate*"

        If the PingFederate service account is not `pingfederate`, replace *\<pingfederate>* with the local user account for the PingFederate service.For example, if *\<pf\_user>* is `pingfed`, replace *\<pingfederate>* with `pingfed`.

        ### Example:

      * Example (truncated)

        If `<pf_install>` and *\<pf\_user>* are `/opt/identity.fed` and `pingfederate` respectively, the required modifications are:

        ```
        ...
        PF_HOME=/opt/identity.fed/pingfederate
        DIR="$PF_HOME/sbin"
        USER="pingfederate"
        ...
        ```

   2. Copy the `pingfederate` script to the SysV initialization directory, for example, `/etc/rc.d/init.d`.

      The exact location might vary, depending on the operating system. Consult your system administrators, as needed. The rest of the step assumes `/etc/rc.d/init.d` is the SysV initialization directory.

   3. Run the following command to update the read-write permissions of the `pingfederate` SysV initialization script:

      ```
      chmod 755 /etc/rc.d/init.d/pingfederate
      ```

   4. Configure the operating system to start the PingFederate service at various runlevels.

      On an RHEL server, you can use the **Service Configuration** utility to do so.

      Alternatively, the initialization directories associated with various runlevels can accept manual symbolic links of the `pingfederate` script by running the `ln -s <source> <target>` command.

      ### Example:

      You can create the following symbolic links on an RHEL server where runlevels 2 and 4 are not used:

      ```
      ln -s /etc/rc.d/init.d/pingfederate /etc/rc3.d/S84pingfederate
      ln -s /etc/rc.d/init.d/pingfederate /etc/rc5.d/S84pingfederate
      ln -s /etc/rc.d/init.d/pingfederate /etc/rc0.d/K15pingfederate
      ln -s /etc/rc.d/init.d/pingfederate /etc/rc1.d/K15pingfederate
      ln -s /etc/rc.d/init.d/pingfederate /etc/rc6.d/K15pingfederate
      ```

   |   |                                                                                                                                         |
   | - | --------------------------------------------------------------------------------------------------------------------------------------- |
   |   | Some operating systems might require a restart of the system to activate the new scripts. Consult your system administrators as needed. |

## Next steps

After setting up the PingFederate SysV initialization script, you can use the `Service Configuration` utility or run the following `service` commands to manage the PingFederate service:

```
service pingfederate start
service pingfederate stop
service pingfederate restart
service pingfederate status
```

## Related links

* [memoryoptions and installation](../performance_tuning_guide/pf_memoryoptions_install.html)

* [Fine-tuning JVM options](../performance_tuning_guide/pf_fine_tuning_jvm_option.html)
