AlmaLinuxへのPostGISのインストール。標準のPostgreSQLを使わない。PostGIS3.1、PostgreSQL14。
- PGDGレポジトリの登録
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm - 標準のPostgreSQLの無効化
dnf -qy module disable postgresql - EPELレポジトリの登録
dnf -y install epel-release - PowerToolsの有効化
dnf -y config-manager –set-enabled powertools - PostGISのインストール
dnf -y install postgis31_14 - データベースにPostGIS拡張を作成
psql -d yourdatabase -c “CREATE EXTENSION postgis;”
参考ページ:Installing PostGIS 3.1 and PostgreSQL 13 on CentOS 8
追記:shp2pgsqlは別途インストールが必要。
dnf -y install postgis31_14-client