/* 최대한 한글 없이 필요한 내용만 작성하는 포스팅입니다. */


1. Add PostGIS repository 



2. Install PostGIS using apt-get 


(root)


01) apt-cache search postgis

....


02) apt-get install 


$ dpkg -l | grep postgis

ii  postgis                              2.1.4+dfsg-1.pgdg12.4+2           Geographic objects support for PostgreSQL

ii  postgis-doc                        2.1.4+dfsg-1.pgdg12.4+2           Geographic objects support for PostgreSQL -- documentation

ii  postgresql-9.3-postgis-2.1            2.1.4+dfsg-1.pgdg12.4+2           Geographic objects support for PostgreSQL 9.3

ii  postgresql-9.3-postgis-2.1-scripts 2.1.4+dfsg-1.pgdg12.4+2           PostGIS for PostgreSQL 9.3 -- scripts -- dummy package

ii  postgresql-9.3-postgis-scripts       2.1.4+dfsg-1.pgdg12.4+2           Geographic objects support for PostgreSQL 9.3 -- scripts


3. applying PostGIS to Database


(PostgreSQL USER!!!! if SuperUser)


01) createdb newDataBaseName 

02) createlang plpgsql newDataBaseName

03) psql -d newDataBaseName -f postgis.sql

04) psql -d newDataBaseName -f spatial_ref_sys.sql

05) psql -d newDataBaseName -f postgis_comments.sql


03~05.... -> error???


(root) 


solution01)  find / -name postgis.sql 


result is maybe /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql


solution02) cd /usr/share/postgresql/9.3/contrib/postgis-2.1/


solution03) retry command 03~05





+ Recent posts