1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows環境でBIGSQLのPostgreSQL 10でPostGISをインストールする方法

Posted at

はじめに

BIGSQLのインストーラーで、PostgreSQL10をインストールした場合、PostGISは付録しておりません。故に、CREATE EXTENSION postgis; をしてもエラーが出ます。

BIGSQLにもPostGISのインストール方法の記載があります
https://www.openscg.com/bigsql/docs/postgis/postgis/

古くて参考にならないオフィシャル情報

BIGSQLには下記のようなPostGISのインストール方法が記載されています。

C:\Program Files\PostgreSQL>pgc install postgis23-pg96
  ['postgis23-pg96']
Get:1 http://s3.amazonaws.com/pgcentral postgis23-pg96-2.3.0-win64
  Unpacking postgis23-pg96-2.3.0-win64.tar.bz2

このコマンドでは、PostgreSQL9.6で、PostGIS2.3 をインストールするという代表例であり、PostgreSQL10では参考になりません。

BIGSQLの PostgreSQL 10 に postGIS 2.4 を入れる方法

インストールコマンド

BIGSQLのPostgreSQLはpgcコマンドによって管理しされています。
PostGISのインストールはpgc install によって実現します。

STEP0:コマンドプロンプトの起動(※管理者として実行)
STEP1:pgc.batが配置されれているディレクトリに移動
STEP2:pgc install postgis24-pg10 を実行

c:\PostgreSQL10のインストールフォルダ>pgc install postgis24-pg10
  ['postgis24-pg10']
Get:1 https://s3.amazonaws.com/pgcentral postgis24-pg10-2.4.3-1-win64
 Unpacking postgis24-pg10-2.4.3-1-win64.tar.bz2

管理者権限が無いユーザアカウントで実行するとエラーが出ると思います。
コマンドプロンプトを実行する際に、アイコンを右クリックして「管理者として実行」を忘れずに。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?