26.3. Configure the Manager #
On the Postgres Pro DBMS instance server:
Add the PPEM package repository:
Get the access key for the repository:
Open your personal account in the technical support portal.
Go to Administration → License Set → Repositories.
Locate and copy the access key.
Access keys are available only to license set administrators.
Download the
pgpro-repo-add.shBash script:wget --user '
access_key_value' --password='' https://repo.postgrespro.com/ppem/ppem/keys/pgpro-repo-add.shNote
Specify the access key value in
--user, not--password. The latter option must be empty.This script adds the Postgres Pro repository so that the package manager of the host operating system can use it.
(Optional) Examine the content of the script, if necessary.
Make the script file executable and run it:
chmod +x pgpro-repo-add.sh && ./pgpro-repo-add.sh
The script will install the Postgres Pro GPG keys, add the repository, and configure the package manager.
When prompted, enter the same access credentials as above:
Important
If no credentials are provided or they are invalid, the script offers to add the repository without credentials.
If you proceed without credentials, you must manually provide the credentials later in order to access the repository.
Install the manager:
# apt install ppem ppem-gui
The
ppem-manager.ymlmanager configuration file will be downloaded to your local device.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.
Create the repository database:
# sudo -u postgres createdb -O ppem ppem
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.confconfiguration file.For example, to allow the manager to connect to the
ppemrepository database on behalf of theppemuser, the following HBA rules may be configured:host ppem ppem ::1/128 trust host ppem ppem 127.0.0.1/32 trust
For more information, refer to the official Postgres Pro documentation on the
pg_hba.confconfiguration file.While connected to the
ppemrepository database on behalf of theppemuser, grant the DBMS user the privilege to read thepg_statisticsystem catalog:GRANT SELECT ON pg_catalog.pg_statistic TO ppem;
In the
ppem-manager.ymlmanager configuration file:Specify the following value and substitute the necessary data:
postgres://ppem:
DBMS_user_password@localhost/ppem
Configure the manager service to start under the operating system user:
Start editing the systemd unit:
# systemctl edit ppem
In the
[Service]section, specify the name of the operating system user:[Service] User=ppem
Ensure that the operating system user is granted the privilege to read the
ppem-manager.ymlmanager configuration file.If the privilege is not granted, execute:
# chown ppem:ppem /etc/ppem-manager.yml # chmod 400 /etc/ppem-manager.yml
Save systemd unit parameters, then reload it:
# systemctl daemon-reload
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.