From b28e02a17b1e993598fb96ab085593b15ca39397 Mon Sep 17 00:00:00 2001 From: Anastasia Alexandrova Date: Thu, 30 Nov 2023 16:59:47 +0100 Subject: [PATCH] DOCS-95 Updated YUm install steps with enabling/disabling required modules per component (#485) --- docs/solutions/postgis-deploy.md | 202 ++----------------------- docs/yum.md | 246 ++++++++++++++++++++++++------- 2 files changed, 203 insertions(+), 245 deletions(-) diff --git a/docs/solutions/postgis-deploy.md b/docs/solutions/postgis-deploy.md index 9321bc278..ad09cb5e4 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. - 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 ppg15 - ``` - - 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 ppg15 - ``` - - 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 ppg15 - ``` - - 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 ppg15 - ``` - - 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 ppg15 - ``` - - 4. Install `epel` repository - - ```{.bash data-prompt="$"} - $ sudo yum install epel-release - ``` + ```{.bash data-prompt="$"} + $ sudo percona-release setup ppg{{pgversion}} + ``` - 5. Disable the upstream `postgresql` package: + 3. Install the extension - ```{.bash data-prompt="$"} - $ sudo dnf module disable postgresql - ``` - - 6. Install the extension - - ```{.bash data-prompt="$"} - $ sudo yum install percona-postgis33 percona-postgis33-client - ``` + ```{.bash data-prompt="$"} + $ sudo yum install percona-postgis33_{{pgversion}} percona-postgis33_{{pgversion}}-client + ``` This installs the set of PostGIS extensions. To check what extensions are available, run the following query from the `psql` terminal: diff --git a/docs/yum.md b/docs/yum.md index 8a8c21db1..bb6747818 100644 --- a/docs/yum.md +++ b/docs/yum.md @@ -6,23 +6,204 @@ This document describes how to install Percona Distribution for PostgreSQL from To install Percona Distribution for PostgreSQL, do the following: -=== "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 - Install the ``epel-release`` 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: + +=== "RHEL8" ```{.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" + + ```{.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 config-manager --set-enabled powertools install perl-IPC-Run -y + ``` + +=== "Oracle Linux 8" + + ```{.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 + ``` + +=== "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 + ``` + +=== "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 + ``` + +=== "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 + ``` + ## Procedure Run all the commands in the following sections as root or using the `sudo` command. @@ -142,55 +323,14 @@ $ sudo yum -y install curl 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-pg{{pgversion}} - ``` - - === "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-pg{{pgversion}} - ``` - - === "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-pg{{pgversion}} - ``` - - 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-pg{{pgversion}} + ``` - 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). + 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). ### Start the service