diff --git a/docs/solutions/postgis-deploy.md b/docs/solutions/postgis-deploy.md index 8248f4537..574b91f0b 100644 --- a/docs/solutions/postgis-deploy.md +++ b/docs/solutions/postgis-deploy.md @@ -43,203 +43,21 @@ The following document provides guidelines how to install PostGIS and how to run === "On RHEL and derivatives" - For Red Hat Enterprise Linux 8 and derivatives, replace the operating system version in the following commands accordingly. + 1. Check the [Platform specific notes](../yum.md#for-postgis) and enable required repositories and modules for the dependencies relevant to your operating system. - === "RHEL 9" + 2. Enable Percona repository - 1. Enable Percona repository - - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - - ```{.bash data-prompt="$"} - $ sudo percona-release setup ppg16 - ``` - - 2. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` - - 3. Enable the `llvm-toolset dnf` module - - ```{.bash data-prompt="$"} - $ sudo dnf module enable llvm-toolset - ``` - - 4. Enable the codeready builder repository to resolve dependencies conflict. - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms - ``` - - 5. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` - - === "CentOS 9" - - 1. Enable Percona repository - - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - - ```{.bash data-prompt="$"} - $ sudo percona-release setup ppg16 - ``` - - 2. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` - - 3. Enable the `llvm-toolset dnf` module - - ```{.bash data-prompt="$"} - $ sudo dnf module enable llvm-toolset - ``` - - 4. Enable the codeready builder repository to resolve dependencies conflict. - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled crb - ``` - - 5. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` - - === "Oracle Linux 9" - - 1. Enable Percona repository - - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - - ```{.bash data-prompt="$"} - $ sudo percona-release setup ppg16 - ``` - - 2. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` - - 3. Enable the `llvm-toolset dnf` module - - ```{.bash data-prompt="$"} - $ sudo dnf module enable llvm-toolset - ``` - - 4. Enable the codeready builder repository to resolve dependencies conflict. - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled ol9_codeready_builder - ``` - - 5. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` - - === "Rocky Linux 9" - - 1. Enable Percona repository - - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - - ```{.bash data-prompt="$"} - $ sudo percona-release setup ppg16 - ``` - - 2. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` - - 3. Enable the `llvm-toolset dnf` module - - ```{.bash data-prompt="$"} - $ sudo dnf module enable llvm-toolset - ``` - - 4. Enable the codeready builder repository to resolve dependencies conflict. - - ```{.bash data-prompt="$"} - $ sudo dnf install dnf-plugins-core - $ sudo dnf config-manager --set-enabled powertools - ``` - - 5. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` - - === "RHEL UBI 9" - - 1. Configure the Oracle-Linux repository. Create the `/etc/yum.repos.d/oracle-linux-ol9.repo` file to install the required dependencies: - - ```init title="/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: - - ```{.bash data-prompt="$"} - $ wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle - ``` - - 3. Enable Percona repository - - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - - ```{.bash data-prompt="$"} - $ sudo percona-release setup ppg16 - ``` - - 4. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` + As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. - 5. Disable the upstream `postgresql` package: + ```{.bash data-prompt="$"} + $ sudo percona-release setup ppg16 + ``` - ```{.bash data-prompt="$"} - $ sudo dnf module disable postgresql - ``` + 3. Install the extension - 6. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` + ```{.bash data-prompt="$"} + $ sudo yum install percona-postgis33 percona-postgis33-client + ``` This installs the set of PostGIS extensions. To check what extensions are available, run the following query from the `psql` terminal: @@ -250,7 +68,7 @@ The following document provides guidelines how to install PostGIS and how to run ## Enable PostGIS extension -3. Create a database and a schema for this database to store your data. A schema is a container that logically segments objects (tables, functions, views, and so on) for better management. Run the following commands from the `psql` terminal: +1. Create a database and a schema for this database to store your data. A schema is a container that logically segments objects (tables, functions, views, and so on) for better management. Run the following commands from the `psql` terminal: ```sql CREATE database nyc; @@ -258,13 +76,13 @@ The following document provides guidelines how to install PostGIS and how to run CREATE SCHEMA gis; ``` -4. To make PostGIS functions and operations work, you need to enable the `postgis` extension. Make sure you are connected to the database you created earlier and run the following command: +2. To make PostGIS functions and operations work, you need to enable the `postgis` extension. Make sure you are connected to the database you created earlier and run the following command: ```sql CREATE EXTENSION postgis; ``` -5. Check that the extension is enabled: +3. Check that the extension is enabled: ```sql SELECT postgis_full_version(); diff --git a/docs/yum.md b/docs/yum.md index e473a4603..1da324f2b 100644 --- a/docs/yum.md +++ b/docs/yum.md @@ -4,25 +4,259 @@ This document describes how to install Percona Distribution for PostgreSQL from ## Platform specific notes -To install Percona Distribution for PostgreSQL, do the following: +Depending on what operating system you are using, you may need to enable or disable specific modules to install Percona Distribution for PostgreSQL packages and to resolve dependencies conflicts for its specific components. -=== "On Red Hat Enterprise Linux v8" +### For Percona Distribution for PostgreSQL packages - Disable the ``postgresql`` and ``llvm-toolset``modules: +=== "CentOS 7" + + Install the `epel-release` package: + + ```{.bash data-prompt="$"} + $ sudo yum -y install epel-release + $ sudo yum repolist + ``` + +=== "RHEL8/Oracle Linux 8/Rocky Linux 8" + + Disable the ``postgresql`` and ``llvm-toolset``modules: ```{.bash data-prompt="$"} $ sudo dnf module disable postgresql llvm-toolset ``` -=== "On CentOS 7" +### For `percona-postgresql{{pgversion}}-devel` package + +You may need to install the `percona-postgresql{{pgversion}}-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: - Install the ``epel-release`` package: +=== "RHEL8" +<<<<<<< HEAD ```{.bash data-prompt="$"} - $ sudo yum -y install epel-release - $ sudo yum repolist + $ sudo yum --enablerepo=codeready-builder-for-rhel-8-rhui-rpms install perl-IPC-Run -y + ``` + +=== "Rocky Linux 8" +======= +>>>>>>> Removed CentOS 8 instructions + + ```{.bash data-prompt="$"} + $ sudo dnf install dnf-plugins-core + $ sudo dnf module enable llvm-toolset + $ sudo dnf config-manager --set-enabled powertools + ``` + +=== "Oracle Linux 8" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol8_codeready_builder install perl-IPC-Run -y + ``` + +=== "Rocky Linux 9" + + ```{.bash data-prompt="$"} + $ 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 + ``` + +=== "Oracle Linux 9" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol9_codeready_builder install perl-IPC-Run -y + ``` + +=== "Rocky Linux 8" + + ```{.bash data-prompt="$"} + $ sudo dnf install dnf-plugins-core + $ sudo dnf module enable llvm-toolset + $ sudo dnf config-manager --set-enabled powertools + ``` + +=== "Oracle Linux 8" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol8_codeready_builder install perl-IPC-Run -y ``` +=== "Rocky Linux 9" + + ```{.bash data-prompt="$"} + $ 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 + ``` + +=== "Oracle Linux 9" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol9_codeready_builder install perl-IPC-Run -y + ``` + +### For `pgpool2` extension + +To install `pgpool2` on Red Hat Enterprise Linux and compatible derivatives, enable the codeready builder repository first to resolve dependencies conflict for `pgpool2`. + +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. + +=== "RHEL 9" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms + ``` + +=== "Rocky Linux 9" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled crb + ``` + +=== "Oracle Linux 9" + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol9_codeready_builder + ``` + +### For PostGIS + +For Red Hat Enterprise Linux 8 and derivatives, replace the operating system version in the following commands accordingly. + +=== "RHEL 9" + + 1. Install `epel` repository + + ```{.bash data-prompt="$"} + $ sudo yum install epel-release + ``` + + 2. Enable the `llvm-toolset dnf` module + + ```{.bash data-prompt="$"} + $ sudo dnf module enable llvm-toolset + ``` + + 3. Enable the codeready builder repository to resolve dependencies conflict. + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms + ``` + +<<<<<<< HEAD +=== "Rocky Linux 9" + + 1. Install `epel` repository + + ```{.bash data-prompt="$"} + $ sudo yum install epel-release + ``` + + 2. Enable the `llvm-toolset dnf` module + + ```{.bash data-prompt="$"} + $ sudo dnf module enable llvm-toolset + ``` + + 3. Enable the codeready builder repository to resolve dependencies conflict. + + ```{.bash data-prompt="$"} + $ sudo dnf install dnf-plugins-core + $ sudo dnf config-manager --set-enabled crb + ``` + +======= +>>>>>>> Removed CentOS 8 instructions +=== "Oracle Linux 9" + + 1. Install `epel` repository + + ```{.bash data-prompt="$"} + $ sudo yum install epel-release + ``` + + 2. Enable the `llvm-toolset dnf` module + + ```{.bash data-prompt="$"} + $ sudo dnf module enable llvm-toolset + ``` + + 3. Enable the codeready builder repository to resolve dependencies conflict. + + ```{.bash data-prompt="$"} + $ sudo dnf config-manager --set-enabled ol9_codeready_builder + ``` + +<<<<<<< HEAD +======= +=== "Rocky Linux 9" + + 1. Install `epel` repository + + ```{.bash data-prompt="$"} + $ sudo yum install epel-release + ``` + + 2. Enable the `llvm-toolset dnf` module + + ```{.bash data-prompt="$"} + $ sudo dnf module enable llvm-toolset + ``` + + 3. Enable the codeready builder repository to resolve dependencies conflict. + + ```{.bash data-prompt="$"} + $ sudo dnf install dnf-plugins-core + $ sudo dnf config-manager --set-enabled crb + ``` + +>>>>>>> Removed CentOS 8 instructions +=== "RHEL UBI 9" + + 1. Configure the Oracle-Linux repository. Create the `/etc/yum.repos.d/oracle-linux-ol9.repo` file to install the required dependencies: + + ```init title="/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: + + ```{.bash data-prompt="$"} + $ wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle + ``` + + 3. Install `epel` repository + + ```{.bash data-prompt="$"} + $ sudo yum install epel-release + ``` + + 4. Disable the upstream `postgresql` package: + + ```{.bash data-prompt="$"} + $ sudo dnf module disable postgresql + ``` + ## Procedure Run all the commands in the following sections as root or using the `sudo` command: @@ -134,53 +368,12 @@ Run all the commands in the following sections as root or using the `sudo` comma Install pgpool2 - To install `pgpool2` on Red Hat Enterprise Linux and compatible derivatives, enable the codeready builder repository first to resolve dependencies conflict for `pgpool2`. The following examples show steps for Red Hat Enterprise Linux 9. - - - === "RHEL 9" - - 1. Enable the codeready builder repository - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms - ``` - - 2. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-pgpool-II-pg16 - ``` - - === "CentOS 9" - - 1. Enable the codeready builder repository - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled crb - ``` - - 2. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-pgpool-II-pg16 - ``` - - === "Oracle Linux 9" - - 1. Enable the codeready builder repository - - ```{.bash data-prompt="$"} - $ sudo dnf config-manager --set-enabled ol9_codeready_builder - ``` - - 2. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-pgpool-II-pg16 - ``` - - For Red Hat Enterprise Linux 8, replace the operating system version in the commands accordingly. + 1. Check the [platform specific notes](#for-pgpool2-extension) + 2. Install the extension + ```{.bash data-prompt="$"} + $ sudo yum install percona-pgpool-II-pg16 + ``` Some extensions require additional setup in order to use them with Percona Distribution for PostgreSQL. For more information, refer to [Enabling extensions](enable-extensions.md). diff --git a/mkdocs-base.yml b/mkdocs-base.yml index 1200ad09f..b4b33f24d 100644 --- a/mkdocs-base.yml +++ b/mkdocs-base.yml @@ -144,16 +144,17 @@ nav: - release-notes-v16.0.upd.md - release-notes-v16.0.md - Installation and Upgrade: - - Install Percona Distribution for PostgreSQL: + - Install: - "Overview": "installing.md" - "Install via apt": "apt.md" - "Install via yum": "yum.md" - enable-extensions.md - repo-overview.md - "Run in Docker": docker.md - - migration.md - - major-upgrade.md - - minor-upgrade.md + - Upgrade: + - "Major upgrade": major-upgrade.md + - minor-upgrade.md + - migration.md - Extensions: - 'pg_stat_monitor': 'pg-stat-monitor.md' - Solutions: