23.3. Configure the Manager #

On the Postgres Pro DBMS instance server:

  1. Add the PPEM package repository:

    # wget -O pgpro-repo-add.sh https://repo.postgrespro.ru/ppem/ppem/keys/pgpro-repo-add.sh
    # sh pgpro-repo-add.sh
    
  2. Install the manager:

    # apt install ppem ppem-gui
    

    The ppem-manager.yml manager configuration file will be downloaded to your local device.

  3. Create the DBMS user on behalf of which the manager will connect to the repository database:

    # sudo -u postgres createuser --pwprompt ppem
    

    When executing this command, specify the DBMS user password.

  4. Create the repository database:

    # sudo -u postgres createdb -O ppem ppem
    
  5. Ensure that the DBMS user can connect to the database:

    # psql -h localhost -U ppem -d ppem
    

    In case of connection issues, ensure that the HBA rule allowing the DBMS user to connect to the database, as well as the authorization method, are specified in the pg_hba.conf configuration file.

    For more information, refer to the official Postgres Pro documentation on the pg_hba.conf configuration file.

  6. While connected to the ppem repository database on behalf of the ppem user, grant the DBMS user the privilege to read the pg_statistic system catalog:

    GRANT SELECT ON pg_catalog.pg_statistic TO ppem;
    
  7. In the ppem-manager.yml manager configuration file:

    • repo.url

      Specify the following value and substitute the necessary data:

      postgres://ppem:DBMS_user_password@localhost/ppem
      
  8. Configure the manager service to start under the operating system user:

    1. Start editing the systemd unit:

      # systemctl edit ppem
      
    2. In the [Service] section, specify the name of the operating system user:

      [Service]
      User=ppem
      
    3. Ensure that the operating system user is granted the privilege to read the ppem-manager.yml manager configuration file.

      If the privilege is not granted, execute:

      # chown ppem:ppem /etc/ppem-manager.yml
      # chmod 400 /etc/ppem-manager.yml
      
    4. Save systemd unit parameters, then reload it:

      # systemctl daemon-reload
      
  9. Start the manager service and add it to the server startup:

    # systemctl start ppem
    # systemctl enable ppem
    

The web application will be installed on the server.