LoginSignup
0
1

More than 5 years have passed since last update.

PostGISをpostgresql9.4に追加

Last updated at Posted at 2016-07-29

概要

PostGISとは

postgresql9.4
CentOS6.8

必要な物をインストール

EPELインストール

$ sudo yum install epel-release

projインストール

$ sudo yum install -y proj proj-devel proj-epsg

gdalインストール

たくさん入る

$ sudo yum --enablerepo=epel install gdal

postGISをインストール

$ sudo yum --enablerepo=epel install postgis2_94.x86_64

確認

postgresqlから使用できるか確認

$ sudo su - postgres
-bash-4.1$ createdb test
-bash-4.1$ psql -d test -c "CREATE EXTENSION postgis;"
CREATE EXTENSION
-bash-4.1$ psql -d test -c "CREATE EXTENSION postgis_topology;"
CREATE EXTENSION
-bash-4.1$ psql -d test -c "\dx;"
                                         List of installed extensions
       Name       | Version |   Schema   |                             Description

------------------+---------+------------+-----------------------------------------------------------
----------
 plpgsql          | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgis          | 2.1.8   | public     | PostGIS geometry, geography, and raster spatial types and
functions
 postgis_topology | 2.1.8   | topology   | PostGIS topology spatial types and functions
(3 rows)

バージョンを確認

gis_db=# select * from postgis_version();
            postgis_version
---------------------------------------
 2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 行)

参考

CentOSにPostGISをyumでインストール(CentOS7.2, PostgreSQL9.5, PostGIS2.2)
PostGISをインストール[PostgreSQL9.2 – Cent6.4]

0
1
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
0
1