Skip to main content
Version 3.1.1

Database Service Installation

PostgreSYS, through PgSmart, provides a simple, easy, fast, and customizable way to install PostgreSQL and the PostGIS georeferencing extension . In addition to providing all the necessary installation packages in one place, in a single guided operation, it is possible to install PostgreSQL binaries and initialize a database instance/cluster, including creating a respective service in the operating system.

Prerequisites
  • PgSmart Installation, observing the minimum requirements.

  • Extra package repository to resolve indirect dependencies. In accordance with the security and support policies of each organization, Tecnisys does not provide such packages. However, to assist you, we inform you that for Enterprise Linux family distributions, the Extra Packages for Enterprise Linux - EPEL repository generally provides the necessary indirect dependencies.

  • The PgSmart Agent must be installed and running on the machine where the database service will be installed.

  • PgSmart Agents Registration from PgSmart through PgSmart-Client.

Command Syntax
Terminal input
    pgsmart install -s cluster [Flags]
Terminal input
    pgsmart install --service=cluster [Flags]

Flags:

  • -M, --pgversion=(11/12/13/14/15). Default: 15. => Majority version of PostgreSQL to be installed.
  • -a, --agent= <agent>. => Defines the alias, hostname, or IP of the server where the PgSmart Agent is installed.
  • -h, --help. => Shows the help.
  • -q, --quiet. => Non-interactive execution for service installation. Used together with --service, --pg-major-version e--agent.
  • --geo-component. => Installs the Georeferencing component (PostGIS), used with the --quiet option.
Non-Interactive Installation

This installation mode is enabled by the quiet option (--quiet, -q) and its execution uses default values for unspecified parameters. However, this option is disabled during the first installation due to the need to create the PostgreSYS package repository based on information requested interactively.

Database Management System Installation

Terminal input
    pgsmart install -a <agent> -q --service=cluster --pg-version=(11|12|13|14|15)
Figure 1 - Cluster Installation - Non interactive
Figure 1 - Cluster Installation - Non interactive

Geo-component extension installation

Terminal input
    pgsmart install -a <agent> -q --geo-component -M 15
figure 2 -Extension Installation - Non interactive
figure 2 -Extension Installation - Non interactive
Interactive Installation
Terminal input
    pgsmart install
  1. Select the desired PgSmart Agent (or Register a new Agent).

  2. Select the Database Service.

  3. Select the Major version of environment PostgreSQL.

  4. Select the desired release of environment PostgreSQL.

  5. Select the Database Service component type to be installed.

    note

    Depending on the choice of the Database Service component, the process will vary, as below.

    5.1. If you select the Database Management System option: You will be prompted to confirm the installation of the package repository, if applicable:

    5.1.1. Confirm if you want to install the PostgreSYS package repository.

    5.1.2. Enter the package repository URL.

    note

    This question is not asked if the pgsys-utils repositories are already present or mapped on the machine.

    5.1.3. Instance Iniciallization

    • After completing the component installation, the next step is to initialize a database instance. This step is crucial to prepare the database for use by configuring and starting the necessary services.

    • Confirm if you want to initialize a Database instance.

    • If initialization is confirmed, the system will follow the Instance Initialization process.

    figure 3 -Cluster Installation - Interactive
    figure 3 -Cluster Installation - Interactive

    5.2. Database Extension Installation:

    5.2.1. Select the extension component to install.

    5.2.2. Confirm the extension installation:

    5.2.3. Confirm whether you want to install the PostgreSYS package repository.

    5.2.4. Enter the package repository URL.

    note

    A opção de instalação do Repositório de pacotes não é realizada se os repositórios pgsys-utils já estiverem presentes ou mapeados na máquina.

    Figure 4 - Extension Installation - Interactive
    Figure 4 - Extension Installation - Interactive

Command Variations for Interactive Installation

Some parameters can be prepended in the command. However, the execution remains interactive; that is, during the installation, the parameters provided must be confirmed, along with default values for those parameters not provided.

Examples:

Terminal input
    pgsmart install --service=cluster
Terminal input
    pgsmart install --pg-version=15
Final Notes

Remember to check the installation logs for any warnings or errors during the process. Log files can provide valuable information in case of issues or for making fine adjustments to the configuration.

Terminal input
tail -f /var/log/pgsmart-agent/pgsmart.log
Terminal input
    tail -f /var/log/pgsmart-client/pgsmart.log
note

PgSmart defines environment variables (PGDATA, PGBIN, etc) in the user's bash_profile file , which will be reloaded in new sessions. To load these variables immediately, run the command below at the end of the installation:

Terminal input
    source~/.bash_profile