Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
17.1. InstallingPostgres Pro Enterprise on Linux
Prev UpChapter 17. Binary InstallationHome Next

17.1. InstallingPostgres Pro Enterprise on Linux

For Linux-based operating systems,Postgres Pro Enterprise is shipped as binary packages. EachPostgres Pro binary distribution consists of several packages. The package structure differs from vanillaPostgreSQL and offers the following installation modes:

  • Quick installation and setup. Thepostgrespro-ent-11 package installs and configures all the components required for a viable ready-to-use configuration of both server and client components. Choose this option if you are going to install a singlePostgres Pro instance only, and you are not worried about possible conflicts with otherPostgreSQL-based products.

    Important

    Installing thepostgrespro-ent-11 package can delete existing installations ofPostgres Pro andPostgreSQL-based products. Similarly, thisPostgres Pro installation may be automatically removed if you later install anotherPostgreSQL-based product. Do not use this package for upgrades or migrations, or if you are going to maintain several installations on the same system.

  • Custom installation. You can select any packages required for your purposes, including development packages. This option needs manual configuration, so a good grasp of Linux and understanding ofPostgreSQL architecture are required. This is the only option to choose if you are going to usePostgres Pro in one of the following scenarios:

    • Install severalPostgres Pro versions side by side, or together with other PostgreSQL-based products.

    • Perform an upgrade from a previous version, or migrate from a differentPostgreSQL-based product.

    • ControlPostgres Pro server execution using high availability software, such aspacemaker, instead of the standard system service management facility.

The minimum hardware required to installPostgres Pro, create a database cluster and start the database server are as follows:

  • 1-GHz processor

  • 1 GB of RAM

  • 1 GB of disk space

Additional disk space is required for data or supporting components.

17.1.1. Supported Linux Distributions

Postgres Pro binary packages are available for the following Linux-based systems:

  • Red Hat Enterprise Linux (RHEL) systems and its derivatives: CentOS 7/8, Red Hat Enterprise Linux 7/8, Oracle Linux 7/8, Rosa Enterprise Linux Server 7, ROSA COBALT (server edition) based on Rosa platform 7, Red OS Murom 7.2, AlterOS 7.5

  • Debian-based systems: Debian 10/11, Ubuntu 20.04, Astra Linux Smolensk 1.6/1.7, Astra Linux Orel 2.12

  • ALT 8/9/10, ALT Linux SPT 7.0, ALT SP 8/8.2 and higher

  • SUSE Linux Enterprise Server (SLES) 12/15

Note

Postgres Pro binary packages rely on thetzdata library provided by the operating system, so you must ensure that the latest available version is installed. Iftzdata is outdated, the time in your database may be incorrect.

17.1.2. Quick Installation and Setup

If you only need to install a singlePostgres Pro instance and are not going to use any otherPostgreSQL-based products on your system, you can use the quick installation mode. The typical process is as follows:

  1. Add the package repository required for your operating system. You can get the exact repositories and commands for supported Linux distributions from thePostgres Pro Enterprise support team.

  2. Install thepostgrespro-ent-11 package. It will bring all the required components via dependencies, create the default database, start the database server, as well as enable server autostart at system boot and make all the provided programs available inPATH.

Note

By default, the database configuration is set for thePostgres Pro product being installed. If you need your database configured for a different product, choosecustom installation and use thetune argument of thepg-setup initdb command.

Once the installation completes, you can launchpsql on behalf of thepostgres user and connect to the newly created database, which is located in the/var/lib/pgpro/ent-11/data directory.

Since the default database is created using thepg-setup script, the path to its data directory is stored in the/etc/default/postgrespro-ent-11 file. All the subsequentpg-setup commands, as well as any commands that managePostgres Pro service, affect this database only. In this file, you can also change the value ofPG_OOM_ADJUST_VALUE for postmaster child processes (seeSection 18.4.4 for details).

17.1.3. Custom Installation

Splitting the distribution into multiple packages enables customizing the installation for different purposes: database servers, client systems, or development workstations. Custom installations need to be configured manually, but give you more flexibility in using the product. You can install severalPostgres Pro versions side by side, as well as together with otherPostgreSQL-based products. In particular, this may be required when performing upgrades, or migrating from a differentPostgreSQL-based product.

To perform a custom installation, complete the following steps:

  1. Add the package repository required for your operating system. You can get the exact repositories and commands for supported Linux distributions from thePostgres Pro Enterprise support team.

  2. ChoosePostgres Pro packages required for your purposes and install them using the standard installation commands for your Linux distribution. The available packages are listed inTable 17.1.

    As a result, all files get installed into the/opt/pgpro/ent-11 directory.

  3. Runpg-wrapper as root to make the installed client and server programs available viaPATH and addSQL man pages to the man page configuration file. This utility is provided in thepostgrespro-ent-11-client package.

    /opt/pgpro/ent-11/bin/pg-wrapper links update

    For details on how to handle possible conflicts, seepg-wrapper description.

  4. If you chose to install thepostgrespro-ent-11-server package, make sure to complete the following server setup:

    1. Create the default database by running the helper scriptpg-setup as root with theinitdb option:

      /opt/pgpro/ent-11/bin/pg-setup initdb [--tune=conf] [initdb_options]

      where:

      • thetune command-line argument sets the database configuration.

      • initdb_options are regularinitdb options.

      Note

      By default,pg-setup initializes the database cluster with checksums enabled. If this is not what you expect, specify the--no-data-checksums.

      Thepg-setup script performs database administration operations as userpostgres. If you do not specify anyinitdb options, the default database is created in the/var/lib/pgpro/ent-11/data directory, using localization settings specified in theLANG environment variable for the current session. All theLC_* environment variables are ignored.

      Since the default database is created using thepg-setup script, the path to its data directory is stored in the/etc/default/postgrespro-ent-11 file. All the subsequentpg-setup commands, as well as any commands that managePostgres Pro service, affect this database only. In this file, you can also change the value ofPG_OOM_ADJUST_VALUE for postmaster child processes (seeSection 18.4.4 for details).

    2. Start the server by runningpg-setup as root, as follows:

      /opt/pgpro/ent-11/bin/pg-setup service start

      Like vanillaPostgreSQL,Postgres Pro server runs on behalf of thepostgres user.

      Note

      By default, automatic server startup is disabled, so you can manually control the database recovery after a system reboot. Optionally, you can configure thePostgres Pro server to start automatically. For details, seeSection 17.1.3.2.

17.1.3.1. Choosing the Packages to Install

The table below lists all the availablePostgres Pro Enterprise packages.

Table 17.1. Postgres Pro Enterprise Packages

Package

Description

postgrespro-ent-11

Top-level package that installs and configuresPostgres Pro for server and client systems. Do not use this package for upgrades or migrations.

Important

Installing thepostgrespro-ent-11 package can delete existing installations ofPostgres Pro andPostgreSQL-based products. Similarly, thisPostgres Pro installation may be automatically removed if you later install anotherPostgreSQL-based product.

postgrespro-ent-11-client

Standard client applications, such aspsql orpg_dump.

postgrespro-ent-11-libs

Shared libraries required to deploy client applications, includinglibpq; runtime libraries for ECPG processor.

postgrespro-ent-11-server

Postgres Pro server and PL/pgSQL server-side programming language.

postgrespro-ent-11-contrib

Additional extensions and programs deployable on database servers.

postgrespro-ent-11-devel

Header files and libraries for developing client applications and server extensions.

On Debian-based systems, this package is calledpostgrespro-ent-11-dev.

postgrespro-ent-11-plperl

Server-side programming language based on Perl (seeChapter 46).

postgrespro-ent-11-plpython

Server-side programming language based on Python (seeChapter 47).

postgrespro-ent-11-plpython3

Server-side programming language based on Python 3 (seeChapter 47).

postgrespro-ent-11-pltcl

Server-side programming language based on Tcl (seeChapter 45).

postgrespro-ent-11-docs

Documentation (English).

postgrespro-ent-11-docs-ru

Documentation (Russian).

postgrespro-ent-11-test

Test scripts for the server.

This package is only available on RHEL-based and SUSE systems.

postgrespro-ent-11-jit

This package provides support for Just-in-Time (JIT) compilation.

This package is only available for the supported Debian and Ubuntu systems, Astra Linux Smolensk 1.6/1.7, Astra Linux Orel 2.12, ALT 8/9/10, ALT SP 8/8.2 and higher, CentOS 7/8, Oracle Linux 7/8, SLES 15, and RHEL 7/8.

To learn more about enabling and using JIT, seeChapter 32.

mamonsu

mamonsu — a monitoring agent for collecting Postgres Pro and system metrics.

pg-portal-modify-ent-11

An extension to modify Postgres Pro cursors.

pg-probackup-ent-11

pg_probackup utility.

pgpro-controldata

pgpro_controldata application to display control information of aPostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.


Besides, there are separate packages providing several external modules that have been pre-built for compatibility with Postgres Pro Enterprise:

Table 17.2. Third-party Packages Built forPostgres Pro Enterprise

Package

Description

libzstd

A library for fast lossless data compression.

oracle-fdw-ent-11

APostgres Pro extension that provides a foreign data wrapper to accessOracle databases.

This package is available for the supported Debian, Ubuntu and SUSE systems, Astra Linux Orel, CentOS 7/8, Oracle Linux 7/8, and RHEL 7/8.

This package is only available for the supported RHEL, Ubuntu and SLES systems, Debian 10/11, and Astra Linux Orel 2.12.

orafce-ent-11

This package implements in Postgres Pro some of the functions from the Oracle database that are missing (or behaving differently).

pg-filedump-ent-11

pg_filedump utility to format Postgres Pro heap/index/control files into a human-readable form.

pg-hint-plan-ent-11

pg_hint_plan module that controls the execution plan by providing hints to the planner.

pg-repack-ent-11

pg_repack extension and utility for reorganizing tables.

pgbouncer

pgbouncer — a connection pooler for Postgres Pro.

pgpro-pgbadger

pgbadger — Postgres Pro log analyzer that provides detailed reports and graphs.

pldebugger-ent-11

A set of shared libraries that implement an API for debugging PL/pgSQL functions in Postgres Pro.

plv8-ent-11

The shared library PLV8 that provides a Postgres Pro procedural language powered by V8 Javascript Engine.

This package is available for the supported Debian and Ubuntu systems, ALT 8/9/10, SLES 15, Rosa Enterprise Linux, and RHEL 7/8.

zstd

Command-line utility for thelibzstd library.


Additionally,Postgres Pro provides separate packages with debug information for some operating systems:

  • On Debian-based systems, see thepostgrespro-ent-11-dbg package.

  • On RHEL-based systems, see thepostgrespro-ent-11-debuginfo package.

  • On ALT Linux systems, all packages containing binary files have the corresponding-debuginfo packages.

Server installations require at least the following packages:

  • postgrespro-ent-11-server

  • postgrespro-ent-11-client

  • postgrespro-ent-11-libs

To use additionalPostgres Pro extensions, you must also install thepostgrespro-ent-11-contrib package. On Debian-based systems,postgrespro-ent-11-server package depends onpostgrespro-ent-11-contrib package, so the latter must always be installed together with the server.

For client installations, it is usually enough to install thepostgrespro-ent-11-client andpostgrespro-ent-11-libs packages. If you use custom applications and do not need standard client utilities such aspsql, you can install thepostgrespro-ent-11-libs package only.

Development workstations require at least the following packages:

  • postgrespro-ent-11-libs

  • postgrespro-ent-11-devel/postgrespro-ent-11-dev

You may also want to install and configure the server with a test database on development systems. For details on additional configuration that may be required,Section 17.1.4.

17.1.3.2. Enabling Automatic Server Startup

If you are running a custom installation, automatic server startup is disabled by default. Once the default database is created, you can configure the server to start automatically upon system boot using service management solutions available in your operating system or third-party high-availability software. To facilitate this task,postgrespro-ent-11-server package provides thepg-setup script, which is installed in the/opt/pgpro/ent-11/bin directory.

To enable server autostart, run thepg-setup script with the following options:

pg-setup service enable

If required, you can disable server autostart using the same script:

pg-setup service disable

Alternatively, you can use system service management solutions directly by running the autostart scripts for SysV-styleinit.d andsystemd provided in thepostgrespro-ent-11-server package. Depending on your Linux distribution,Postgres Pro supports different service management solutions:

Linux Distribution

Provided Scripts

RHEL 7/8 and compatible distributions, SLES 12/15

systemd unit file

Debian, Ubuntu, ALT 8/9/10

Bothsystemd unit file and SysV-styleinit.d script

To usesystemd for automatic server startup, run the following command:

systemctl enable postgrespro-ent-11

To use SysV-styleinit.d script:

  • On ALT Linux systems, run the following command:

    systemctl enable postgrespro-ent-11

  • On Debian systems, useupdate-rc.d. See the correspondingman page for details.

17.1.4. Setting up Development Workstations

While installingpostgrespro-ent-11-libs andpostgrespro-ent-11-devel/postgrespro-ent-11-dev packages may be enough, it is usually convenient to have the server set up on the development system. For quick setup, you can installpostgrespro-ent-11 package, which automatically configures the provided client and server programs and creates the default database. However, if you are going to use severalPostgreSQL-based products simultaneously, follow the custom installation instructions inSection 17.1.3.

To compile programs withPostgres Pro libraries using thepg_config utility shipped withPostgres Pro, make sure it appears before the path to otherpg_config versions, if any. Note that on RHEL-based systemspg_config is not added toPATH automatically. If you do not have any otherpg_config versions on your system, you can usepg-wrapper provided in thepostgrespro-ent-11-client package to create a symbolic link topg_config in the standard binary directory.

To compile programs usingpkg-config command, add the/opt/pgpro/ent-11/lib/pkgconfig/ path to thePKG_CONFIG_PATH environment variable.

If you would like to compilePostgres Pro extensions that supportJIT inlining, make sure to meet the following additional requirements:

  • Install LLVM development package and Clang compiler. You must choose the packages of the same version that was used for thepostgrespro-ent-11-jit to be installed on the server. To determine the required version for the currentPostgres Pro release, check theCLANG value in the/opt/pgpro/ent-11/lib/pgxs/src/Makefile.global file.

  • When runningmake ormake install commands, specify thewith-llvm=yes option to compile and install bitcode files for your extension. By default, bitcode compilation is disabled as it depends on Clang compiler availability.

17.1.4.1. Using Third-Party Programs withPostgres Pro

To usePostgres Pro server with a client program provided with a third-party product, you can install the version ofPostgreSQL libraries that was used to compile this program. For example, if this program is provided with vanillaPostgreSQL, you may need to install thelibpq orpostgresql-libs packages available for your Linux distribution. In this case, the program may not be able to use some new features ofPostgres Pro server, but it is probably not designed to use them anyway.

If you prefer to usePostgres Pro libraries with a third-party program, or would like to enable support for a new feature that does not require client application change, such asSCRAM authentication, you can recompile your program withPostgres Pro libraries.

If you are creating.rpm or.deb packages for your program, it is recommended to do the following:

Thus, you can ensure that your package build process calls the right version ofpg_config whenever the source package is rebuilt.

To set up severalPostgres Pro server instances with different data directories on Linux, do the following:

  1. Install and configurePostgres Pro as explained inSection 17.1.2 orSection 17.1.3.

  2. Once the first default database is created, runinitdb specifying the path to a different data directory and any other parameters required to initialize another server instance.

  3. Specify different ports for your server instances in the correspondingpostgresql.conf files to avoid conflicts.

  4. If required, configure automatic server startup, as follows:

    1. Create a copy of/etc/init.d/postgrespro-ent-11 or/lib/systemd/system/postgrespro-ent-11.service with a different name, specifying the path to the data directory.

    2. Enable automatic server startup using the provided autostart scripts for your system service management facility instead ofpg-setup, as described inSection 17.1.3.2. Make sure to use the renamed copies of the scripts you created in step 1.

17.1.6. Antivirus Considerations

It is strongly recommended to avoid using antivirus software on systems wherePostgres Pro is running because it may cause additional load on your environment and result in unexpected database behavior that would lead to performance and reliability issues. If you need to use antivirus software, make sure to exclude the following directories from virus scanning as they do not contain any executable files:

  • PGDATA directory that stores main cluster data, usually located in/var/lib/pgpro/ent-11/data unless you specified another directory ininitdb options

  • Paths to createdtablespaces


Prev Up Next
Chapter 17. Binary Installation Home 17.2. InstallingPostgres Pro Enterprise on Windows
epubpdf
Go to Postgres Pro Enterprise 11
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp