CentOS7 + PostgreSQL11 + PostGIS2.5のインストール

パッケージのインストール
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
Postresqlのインストール
yum install postgresql11-server postgresql11-devel postgresql11-contrib
依存ライブラリのインストール
yum –enablerepo=epel install gdal
PostGIS 2.5のインストール
yum install postgis25_11.x86_64 postgis25_11-client.x86_64 postgis25_11-devel.x86_64
PostgreSQLを初期化
PGSETUP_INITDB_OPTIONS=”-E UTF8 –locale=C” /usr/pgsql-11/bin/postgresql-11-setup initdb
PostgreSQLの起動
systemctl start postgresql-11
PostgreSQLに自動起動
systemctl enable postgresql-11
環境設定
vi /var/lib/pgsql/11/data/postgresql.conf
listen_addresses = ‘*’
port = 5432
再起動
systemctl restart postgresql-11
vi /var/lib/pgsql/11/data/pg_hba.conf
host all all *.*.*.*/32 md5
パスワード設定
su – postgres
-bash-4.2$ psql
postgres=# alter role postgres with password ‘パスワード’;

コメント

タイトルとURLをコピーしました