SlideShare a Scribd company logo
1 of 4
Download to read offline
Setting up PostGIS
• Here is what I do on PostGIS 8.4 (granted, an older vsion)
!
• Install Postgresql and PostGIS
!
• Create cluster (just DB)
!
!
!

initdb -D /var/lib/postgresql/data

• Start postgres
postgres -D /var/lib/postgresql/data
Setting up PostGIS
• Create database
• As “postgres" user, create postgresql tables using Imposm’s
create-db.sh script (and modified for the right db name)
• (I was using Imposm 2.0)
create-db.sh
Setting up PostGIS
• Set it so I bind to the IP and port and expose it
!
!
!
!
!

In /var/lib/postgresql/data/postgresql.conf

• Trust the connection to the database to my computer
In /var/lib/postgresql/data/pg_hba.conf
Importing into PostGIS
• Finally, import the data
osm2pgsql -c -G -U postgres -d osm -S /usr/share/
osm2pgsql/default.style your_file.osm.pbf 

(or .osm)

More Related Content

What's hot

Easy access to open stack object storage
Easy access to open stack object storageEasy access to open stack object storage
Easy access to open stack object storageJuan José Martínez
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Dobrica Pavlinušić
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture ForumChristopher Spring
 
Build website using Open Source Technology
Build website using Open Source TechnologyBuild website using Open Source Technology
Build website using Open Source TechnologyArunkumar Kupppuswamy
 
2 docker engine_hands_on
2 docker engine_hands_on2 docker engine_hands_on
2 docker engine_hands_onFEG
 
Microsoft Azure Media Services
Microsoft Azure Media ServicesMicrosoft Azure Media Services
Microsoft Azure Media ServicesPavel Revenkov
 
Docker 入門 Introduction to Docker
Docker 入門  Introduction to DockerDocker 入門  Introduction to Docker
Docker 入門 Introduction to DockerGenchi Lu
 
Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015luisamariethm
 
GlusterFS As an Object Storage
GlusterFS As an Object StorageGlusterFS As an Object Storage
GlusterFS As an Object StorageKeisuke Takahashi
 
A simple introduction to redis
A simple introduction to redisA simple introduction to redis
A simple introduction to redisZhichao Liang
 
MongoDB EuroPython 2009
MongoDB EuroPython 2009MongoDB EuroPython 2009
MongoDB EuroPython 2009Mike Dirolf
 
Administration
AdministrationAdministration
AdministrationMongoSF
 

What's hot (20)

GruntJS + Wordpress
GruntJS + WordpressGruntJS + Wordpress
GruntJS + Wordpress
 
Easy access to open stack object storage
Easy access to open stack object storageEasy access to open stack object storage
Easy access to open stack object storage
 
Joy of Unix
Joy of UnixJoy of Unix
Joy of Unix
 
Docker ppt
Docker pptDocker ppt
Docker ppt
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture Forum
 
Build website using Open Source Technology
Build website using Open Source TechnologyBuild website using Open Source Technology
Build website using Open Source Technology
 
Mongodb
MongodbMongodb
Mongodb
 
Conair
ConairConair
Conair
 
2 docker engine_hands_on
2 docker engine_hands_on2 docker engine_hands_on
2 docker engine_hands_on
 
Microsoft Azure Media Services
Microsoft Azure Media ServicesMicrosoft Azure Media Services
Microsoft Azure Media Services
 
Docker 入門 Introduction to Docker
Docker 入門  Introduction to DockerDocker 入門  Introduction to Docker
Docker 入門 Introduction to Docker
 
Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015
 
MongoDB
MongoDBMongoDB
MongoDB
 
GlusterFS As an Object Storage
GlusterFS As an Object StorageGlusterFS As an Object Storage
GlusterFS As an Object Storage
 
A simple introduction to redis
A simple introduction to redisA simple introduction to redis
A simple introduction to redis
 
Front end development gurant
Front end development gurantFront end development gurant
Front end development gurant
 
Mysqlnd uh
Mysqlnd uhMysqlnd uh
Mysqlnd uh
 
MongoDB EuroPython 2009
MongoDB EuroPython 2009MongoDB EuroPython 2009
MongoDB EuroPython 2009
 
Administration
AdministrationAdministration
Administration
 

Viewers also liked

свадьбы турандот New
свадьбы турандот Newсвадьбы турандот New
свадьбы турандот Newdellosevents
 
SUNSHOW 夢 ハウス 鷺山モデル
SUNSHOW 夢 ハウス 鷺山モデルSUNSHOW 夢 ハウス 鷺山モデル
SUNSHOW 夢 ハウス 鷺山モデルTetsuhito Nishioka
 
20140226 岐阜 高校生 講演
20140226 岐阜 高校生 講演20140226 岐阜 高校生 講演
20140226 岐阜 高校生 講演Tetsuhito Nishioka
 
частные мероприятия каста дива
частные мероприятия каста дивачастные мероприятия каста дива
частные мероприятия каста диваdellosevents
 
детские праздники
детские праздникидетские праздники
детские праздникиdellosevents
 
Variations in different international retail market
Variations in different international retail marketVariations in different international retail market
Variations in different international retail marketVikram Ram
 
How to make pin of flanel
How to make pin of flanelHow to make pin of flanel
How to make pin of flanelajengpng
 

Viewers also liked (7)

свадьбы турандот New
свадьбы турандот Newсвадьбы турандот New
свадьбы турандот New
 
SUNSHOW 夢 ハウス 鷺山モデル
SUNSHOW 夢 ハウス 鷺山モデルSUNSHOW 夢 ハウス 鷺山モデル
SUNSHOW 夢 ハウス 鷺山モデル
 
20140226 岐阜 高校生 講演
20140226 岐阜 高校生 講演20140226 岐阜 高校生 講演
20140226 岐阜 高校生 講演
 
частные мероприятия каста дива
частные мероприятия каста дивачастные мероприятия каста дива
частные мероприятия каста дива
 
детские праздники
детские праздникидетские праздники
детские праздники
 
Variations in different international retail market
Variations in different international retail marketVariations in different international retail market
Variations in different international retail market
 
How to make pin of flanel
How to make pin of flanelHow to make pin of flanel
How to make pin of flanel
 

Similar to Postgis setup

Installing postgres & postgis
Installing postgres & postgisInstalling postgres & postgis
Installing postgres & postgisJohn Ashmead
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentJames Bundey
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linuxchinkshady
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Denish Patel
 
How to configure multiple PostgreSQL-9
How to configure multiple PostgreSQL-9How to configure multiple PostgreSQL-9
How to configure multiple PostgreSQL-9Vivek Singh
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
Mojo – Simple REST Server
Mojo – Simple REST ServerMojo – Simple REST Server
Mojo – Simple REST Serverhendrikvb
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Kate Marshalkina
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
collectd & PostgreSQL
collectd & PostgreSQLcollectd & PostgreSQL
collectd & PostgreSQLMark Wong
 
Data integration with embulk
Data integration with embulkData integration with embulk
Data integration with embulkTeguh Nugraha
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Prajal Kulkarni
 
Logs aggregation and analysis
Logs aggregation and analysisLogs aggregation and analysis
Logs aggregation and analysisDivante
 
Docker Advanced registry usage
Docker Advanced registry usageDocker Advanced registry usage
Docker Advanced registry usageDocker, Inc.
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialAssistSoftware
 

Similar to Postgis setup (20)

Installing postgres & postgis
Installing postgres & postgisInstalling postgres & postgis
Installing postgres & postgis
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 
How to configure multiple PostgreSQL-9
How to configure multiple PostgreSQL-9How to configure multiple PostgreSQL-9
How to configure multiple PostgreSQL-9
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
Logstash
LogstashLogstash
Logstash
 
Mojo – Simple REST Server
Mojo – Simple REST ServerMojo – Simple REST Server
Mojo – Simple REST Server
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
collectd & PostgreSQL
collectd & PostgreSQLcollectd & PostgreSQL
collectd & PostgreSQL
 
Data integration with embulk
Data integration with embulkData integration with embulk
Data integration with embulk
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
 
Logs aggregation and analysis
Logs aggregation and analysisLogs aggregation and analysis
Logs aggregation and analysis
 
Docker Advanced registry usage
Docker Advanced registry usageDocker Advanced registry usage
Docker Advanced registry usage
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework Tutorial
 

Postgis setup

  • 1. Setting up PostGIS • Here is what I do on PostGIS 8.4 (granted, an older vsion) ! • Install Postgresql and PostGIS ! • Create cluster (just DB) ! ! ! initdb -D /var/lib/postgresql/data • Start postgres postgres -D /var/lib/postgresql/data
  • 2. Setting up PostGIS • Create database • As “postgres" user, create postgresql tables using Imposm’s create-db.sh script (and modified for the right db name) • (I was using Imposm 2.0) create-db.sh
  • 3. Setting up PostGIS • Set it so I bind to the IP and port and expose it ! ! ! ! ! In /var/lib/postgresql/data/postgresql.conf • Trust the connection to the database to my computer In /var/lib/postgresql/data/pg_hba.conf
  • 4. Importing into PostGIS • Finally, import the data osm2pgsql -c -G -U postgres -d osm -S /usr/share/ osm2pgsql/default.style your_file.osm.pbf 
 (or .osm)