Skip to content
This documentation is for the end of life version of Percona Distribution for PostgreSQL 11.
Learn more about PostgreSQL 11 end of life implications. See the current documentation.
logo
Percona Product Documentation
Via yum
Initializing search
    percona/postgresql-docs
    percona/postgresql-docs
    • Home
      • Release notes index
      • Percona Distribution for PostgreSQL 11.22 Update (2024-01-22)
      • Percona Distribution for PostgreSQL 11.22 (2023-12-13)
      • Percona Distribution for PostgreSQL 11.21 (2023-08-31)
      • Percona Distribution for PostgreSQL 11.20 (2023-06-30)
      • Percona Distribution for PostgreSQL 11.19 Update (2023-05-22)
      • Percona Distribution for PostgreSQL 11.19 (2023-03-31)
      • Percona Distribution for PostgreSQL 11.18 (2022-12-08)
      • Percona Distribution for PostgreSQL 11.17 (2022-09-08)
      • Percona Distribution for PostgreSQL 11.16 (2022-06-07)
      • Percona Distribution for PostgreSQL 11.15 Second Update (2022-05-05)
      • Percona Distribution for PostgreSQL 11.15 Update (2022-04-14)
      • Percona Distribution for PostgreSQL 11.15 (2022-04-08)
      • Percona Distribution for PostgreSQL 11.14 (2021-12-20)
      • Percona Distribution for PostgreSQL 11.13 Update (2021-12-07)
      • Percona Distribution for PostgreSQL 11.13 (2021-09-09)
      • Percona Distribution for PostgreSQL 11.12 Third Update (2021-07-15)
      • Percona Distribution for PostgreSQL 11.12 Second Update (2021-07-01)
      • Percona Distribution for PostgreSQL 11.12 Update (2021-06-10)
      • Percona Distribution for PostgreSQL 11.12 (2021-05-24)
      • Percona Distribution for PostgreSQL 11.11 Third Update (2021-06-10)
      • Percona Distribution for PostgreSQL 11.11 Second Update (2021-05-10)
      • Percona Distribution for PostgreSQL 11.11 Update (2021-04-12)
      • Percona Distribution for PostgreSQL 11.11 (2021-03-08)
      • Percona Distribution for PostgreSQL 11.10 Update (2021-06-10)
      • Percona Distribution for PostgreSQL 11.10 (2020-12-15)
      • Percona Distribution for PostgreSQL 11.9 (2020-09-08)
      • Percona Distribution for PostgreSQL 11.8 (2020-06-11)
      • Percona Distribution for PostgreSQL 11.7 (2020-04-09)
      • Percona Distribution for PostgreSQL 11.6 (2020-01-23)
      • Percona Distribution for PostgreSQL 11 (2019-09-17)
      • Percona Distribution for PostgreSQL 11 (Beta) (2019-05-15)
        • Overview
        • Via apt
        • Via yum
          • Platform specific notes
            • For Percona Distribution for PostgreSQL packages
            • For percona-postgresql11-devel package
            • For percona-patroni package
            • For pgpool2 extension
            • For PostGIS
          • Procedure
            • Install dependencies
            • Configure the repository
            • Install packages
            • Start the service
            • Connect to the PostgreSQL server
        • Enable Percona Distribution for PostgreSQL extensions
        • Repositories overview
      • Run in Docker
      • Migrate from PostgreSQL to Percona Distribution for PostgreSQL
      • Minor Upgrade of Percona Distribution for PostgreSQL
      • pg_stat_monitor
      • High availability
        • Deploying on Debian or Ubuntu
        • Deploying on RHEL or CentOS
        • Testing the Patroni PostgreSQL Cluster
        • pgBackRest setup
      • Backup and disaster recovery
        • Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL
        • Overview
        • Deployment
        • Query spatial data
        • Upgrade spatial database
      • LDAP authentication
    • Telemetry
    • Uninstall
    • Licensing
    • Trademark policy

    • Platform specific notes
      • For Percona Distribution for PostgreSQL packages
      • For percona-postgresql11-devel package
      • For percona-patroni package
      • For pgpool2 extension
      • For PostGIS
    • Procedure
      • Install dependencies
      • Configure the repository
      • Install packages
      • Start the service
      • Connect to the PostgreSQL server

    Install Percona Distribution for PostgreSQL on Red Hat Enterprise Linux and derivatives¶

    This document describes how to install Percona Distribution for PostgreSQL from Percona repositories on RPM-based distributions such as Red Hat Enterprise Linux and compatible derivatives. Read more about Percona repositories.

    Platform specific notes¶

    To install Percona Distribution for PostgreSQL, do the following:

    For Percona Distribution for PostgreSQL packages¶

    Install the epel-release package:

    $ sudo yum -y install epel-release
    $ sudo yum repolist
    

    Disable the postgresql and llvm-toolsetmodules:

    $ sudo dnf module disable postgresql llvm-toolset
    

    For percona-postgresql11-devel package¶

    You may need to install the percona-postgresql11-devel package when working with some extensions or creating programs that interface with PostgreSQL database. This package requires dependencies that are not part of the Distribution, but can be installed from the specific repositories:

    $ sudo yum --enablerepo=codeready-builder-for-rhel-8-rhui-rpms install perl-IPC-Run -y
    
    $ sudo dnf install dnf-plugins-core
    $ sudo dnf module enable llvm-toolset
    $ sudo dnf config-manager --set-enabled powertools
    
    $ sudo dnf config-manager --set-enabled ol8_codeready_builder install perl-IPC-Run -y
    
    $ sudo dnf install dnf-plugins-core
    $ sudo dnf module enable llvm-toolset
    $ sudo dnf config-manager --set-enabled crb
    $ sudo dnf install perl-IPC-Run -y
    
    $ sudo dnf config-manager --set-enabled ol9_codeready_builder install perl-IPC-Run -y
    

    For percona-patroni package¶

    To install Patroni on Red Hat Enterprise Linux 9 and compatible derivatives, enable the epel repository

    $ sudo yum install epel-release
    

    For pgpool2 extension¶

    To install pgpool2 on Red Hat Enterprise Linux and compatible derivatives, enable the codeready builder repository first to resolve the dependencies conflict.

    The following are commands for Red Hat Enterprise Linux 9 and derivatives. For Red Hat Enterprise Linux 8, replace the operating system version in the commands accordingly.

    $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms
    
    $ sudo dnf config-manager --set-enabled crb
    
    $ sudo dnf config-manager --set-enabled ol9_codeready_builder
    

    For PostGIS¶

    The following commands provide instructions how to enable required repositories and modules on Red Hat Enterprise Linux 9 and derivatives.

    For Red Hat Enterprise Linux 8 and derivatives, replace the operating system version in the commands accordingly.

    1. Install epel repository

      $ sudo yum install epel-release
      
    2. Enable the llvm-toolset dnf module

      $ sudo dnf module enable llvm-toolset
      
    3. Enable the codeready builder repository to resolve dependencies conflict.

      $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms
      
    1. Install epel repository

      $ sudo yum install epel-release
      
    2. Enable the llvm-toolset dnf module

      $ sudo dnf module enable llvm-toolset
      
    3. Enable the codeready builder repository to resolve dependencies conflict.

      $ sudo dnf install dnf-plugins-core
      $ sudo dnf config-manager --set-enabled crb
      
    1. Install epel repository

      $ sudo yum install epel-release
      
    2. Enable the llvm-toolset dnf module

      $ sudo dnf module enable llvm-toolset
      
    3. Enable the codeready builder repository to resolve dependencies conflict.

      $ sudo dnf config-manager --set-enabled ol9_codeready_builder
      
    1. Configure the Oracle-Linux repository. Create the /etc/yum.repos.d/oracle-linux-ol9.repo file to install the required dependencies:

      /etc/yum.repos.d/oracle-linux-ol9.repo
      [ol9_baseos_latest]
      name=Oracle Linux 9 BaseOS Latest ($basearch)
      baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/$basearch/
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
      gpgcheck=1
      enabled=1     
      
      [ol9_appstream]
      name=Oracle Linux 9 Application Stream ($basearch)
      baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/appstream/$basearch/
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
      gpgcheck=1
      enabled=1     
      
      [ol9_codeready_builder]
      name=Oracle Linux 9 CodeReady Builder ($basearch) - Unsupported
      baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/codeready/builder/$basearch/
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
      gpgcheck=1
      enabled=1
      
    2. Download the right GPG key for the Oracle Yum Repository:

      $ wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
      
    3. Install epel repository

      $ sudo yum install epel-release
      

    Procedure¶

    Run all the commands in the following sections as root or using the sudo command.

    Install dependencies¶

    Install curl for Telemetry. We use it to better understand the use of our products and improve them.

    $ sudo yum -y install curl
    

    Configure the repository¶

    1. Install the percona-release repository management tool to subscribe to Percona repositories:

      $ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
      
    2. Enable the repository

    Percona provides two repositories for Percona Distribution for PostgreSQL. We recommend enabling the Major release repository to timely receive the latest updates.

    $ sudo percona-release setup ppg11
    

    Install packages¶

    The meta package enables you to install several components of the distribution in one go.

    $ sudo yum install percona-ppg-server11
    
    1. Install the PostgreSQL server package:

      $ sudo yum install percona-postgresql11-server
      
    2. Install the components:

      Install pg_repack:

      $ sudo yum install percona-pg_repack11
      

      Install pgaudit:

      $ sudo yum install percona-pgaudit11
      

      Install pgBackRest:

      $ sudo yum install percona-pgbackrest
      

      Install Patroni:

      $ sudo yum install percona-patroni
      

      Install pg_stat_monitor:

      Install pgBouncer:

      $ sudo yum install percona-pgbouncer
      

      Install pgAudit-set_user:

      $ sudo yum install percona-pgaudit11_set_user
      

      Install pgBadger:

      $ sudo yum install percona-pgbadger
      

      Install wal2json:

      $ sudo yum install percona-wal2json11
      

      Install PostgreSQL contrib extensions:

      $ sudo yum install percona-postgresql11-contrib
      

      Install HAProxy

      $ sudo yum install percona-haproxy
      

      Install pg_gather

      $ sudo yum install percona-pg_gather
      

      Install pgpool2

      1. Check the platform specific notes
      2. Install the extension

        $ sudo yum install percona-pgpool-II-pg11
        

    Some extensions require additional setup in order to use them with Percona Distribution for PostgreSQL. For more information, refer to Enabling extensions.

    Start the service¶

    After the installation, the default database storage is not automatically initialized. To complete the installation and start Percona Distribution for PostgreSQL, initialize the database using the following command:

    $ /usr/pgsql-11/bin/postgresql-11-setup initdb
    

    Start the PostgreSQL service:

    $ sudo systemctl start postgresql-11
    

    Connect to the PostgreSQL server¶

    By default, postgres user and postgres database are created in PostgreSQL upon its installation and initialization. This allows you to connect to the database as the postgres user.

    $ sudo su postgres
    

    Open the PostgreSQL interactive terminal:

    $ psql
    

    Hint

    You can connect to psql as the postgres user in one go:

    $ sudo su - postgres -c psql
    

    To exit the psql terminal, use the following command:

    $ \q
    

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.

    December 13, 2023 December 5, 2022
    Percona LLC and/or its affiliates, © 2024 — Cookie Preferences
    Made with Material for MkDocs