Skip to content

Commit

Permalink
DOCS-95 Extended platform specific notes for YUM installation (12) (#491
Browse files Browse the repository at this point in the history
)

modified:   docs/yum.md
modified:   docs/solutions/postgis-deploy.md
  • Loading branch information
nastena1606 authored Dec 12, 2023
1 parent 872c786 commit fcbcae2
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 266 deletions.
232 changes: 25 additions & 207 deletions docs/solutions/postgis-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ppg12
```

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 ppg12
```
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 ppg12
```
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.
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 ppg12
```
```{.bash data-prompt="$"}
$ sudo percona-release setup ppg{{pgversion}}
```
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 ppg12
```

4. Install `epel` repository

```{.bash data-prompt="$"}
$ sudo yum install epel-release
```

5. Disable the upstream `postgresql` package:

```{.bash data-prompt="$"}
$ sudo dnf module disable postgresql
```

6. Install the extension
3. 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:

Expand Down Expand Up @@ -312,20 +130,20 @@ PostGIS provides the `shp2pgsql` command line utility that converts the binary d

3. Check the uploaded data

```sql
\d nyc_streets;
Table "public.nyc_streets"
Column | Type | Collation | Nullable | Default
--------+---------------------------------+-----------+----------+------------------------------------------
gid | integer | | not null | nextval('nyc_streets_gid_seq'::regclass)
id | double precision | | |
name | character varying(200) | | |
oneway | character varying(10) | | |
type | character varying(50) | | |
geom | geometry(MultiLineString,26918) | | |
Indexes:
"nyc_streets_pkey" PRIMARY KEY, btree (gid)
"nyc_streets_geom_idx" gist (geom)
```
```sql
\d nyc_streets;
Table "public.nyc_streets"
Column | Type | Collation | Nullable | Default
--------+---------------------------------+-----------+----------+------------------------------------------
gid | integer | | not null | nextval('nyc_streets_gid_seq'::regclass)
id | double precision | | |
name | character varying(200) | | |
oneway | character varying(10) | | |
type | character varying(50) | | |
geom | geometry(MultiLineString,26918) | | |
Indexes:
"nyc_streets_pkey" PRIMARY KEY, btree (gid)
"nyc_streets_geom_idx" gist (geom)
```

4. Repeat the command to upload other shapefiles in the data set: `nyc_census_blocks`, `nyc_neighborhoods`, `nyc_subway_stations`
Loading

0 comments on commit fcbcae2

Please sign in to comment.