SlideShare a Scribd company logo
1 of 27
Download to read offline
Installing
Postgres & Postgis
Mostly on a Mac,
but also on Linux
& Windows
John Ashmead
Why?
•Building a mapping website!
•Wanted Postgres 9.2 to go pure

Javascript: client, server (node.js), &
database!!

•And wanted latest & greatest mapping
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Objective
•Postgres 9.2!
•Postgis 2.0 http://www.postgis.org/!
•psql, pgAdmin3, & phpPgAdmin!
•Node.js!
•PL/Javascript
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Stack Builder

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Strategies
•EnterpriseDB - provides Stack Builder

not currently current, but good starting
point!

•DMGs - not always current, but good
intel!

•Open source: fink, homebrew,

macports - can be hacked, instructive

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
EnterpriseDB

% sudo vi /etc/sysctl.conf
!
On a MacBook Pro with 2GB of RAM, the author's sysctl.conf contains:
!
kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Kyngchaos
•Stackbuilder!
•Not quite current: when did first, was
Postgres 9.1, PostGIS 1.5. (Now is 9.1,
but 2.0.0)!

•But lots of good information, i.e.

PostGIS has lots of dependencies: geos,
proj4, some others

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Xcode

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Open source
packagers
•Fink - precompiled binaries preferred. Not
as up to date. Not current enough.!

•Homebrew - easier to use. On github. Uses
ruby. Less intrusive. Assumes single user.!

•Macports - tends to pull a lot of stuff down.
Possibly more general. Used here. http://
www.macports.org/

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Portfiles
https://trac.macports.org/browser/trunk/dports/databases/
postgis2/Portfile
variant postgresql92
description {Builds with postgresql
9.2} 
conflicts postgresql90 postgresql91 {
depends_lib-append
port:postgresql92
archcheck.files-append lib/postgresql92/libpq.dylib
configure.args-append
--libdir=${prefix}/lib/postgresql92
--with-pgconfig=${prefix}/lib/
postgresql92/bin/pg_config
build.args-append
PGSQL_DOCDIR=${destroot}${prefix}/
share/doc/postgresql91
PGSQL_MANDIR=${destroot}${prefix}/
share/man
}
!

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Port commands
port list > /dev/null
Warning: port definitions are more than two weeks old, consider
using selfupdate
port selfupdate
[ port upgrade postgresql92 skipped ]
port -v install postgresql91 +perl +tcl +python
port -v install postgresql91-doc
port install pgAdmin3 +postgresql91 +with_postgresql91
port install postgis2 +postgresql91 +raster +gui +topology

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Daemondo
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=vm-pop3d</string>
<string>--start-cmd</string>
<string>/opt/local/sbin/vm-pop3d</string>
<string>-d</string>
<string>10</string>
<string>-t</string>
<string>600</string>
<string>;</string>
</array>

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Launch Daemons

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Processes
507 7714
1
0 5:22PM ??
0:00.04 /Library/
PostgreSQL/9.2/bin/postmaster -D/Library/PostgreSQL/9.2/data
507 7715 7714
0 5:22PM ??
0:00.00 postgres: logger
process
507 7717 7714
0 5:22PM ??
0:00.01 postgres:
checkpointer process
507 7718 7714
0 5:22PM ??
0:00.05 postgres: writer
process
507 7719 7714
0 5:22PM ??
0:00.03 postgres: wal
writer process
507 7720 7714
0 5:22PM ??
0:00.05 postgres:
autovacuum launcher process
507 7721 7714
0 5:22PM ??
0:00.07 postgres: stats
collector process
~

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Profile variables
vi .profile
# to change back to Postgres 9.1, fix path & set PGPORT to 5432,
export PATH=".:/opt/local/lib/postgresql92/bin:/Library/
PostgreSQL/9.2/bin:$PATH”
!
export PGDATABASE=talkinvite
export PGUSER=talkinvite
export PGPORT=5433
vi apache/conf/httpd.conf
#
ServerRoot "/Library/PostgreSQL/EnterpriseDB-ApachePHP/apache"
# Listen: Allows you to bind Apache to specific IP addresses and/
#
Listen 8081
vi phpPgAdmin/conf/config.inc.php
# to change back to Postgres 9.1, fix path & set PGPORT to 5432,
// Database port on server (5432 is the PostgreSQL default)
// Using 5433 for Postgres 9.2
$conf['servers'][0]['port'] = 5433;
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Verify
•Check psql, pgAgent3, pgPhpAdmin
(using apache)!

•Bounce box, make sure it comes back!
•Hand save some simple maps, then
recover

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Linux/Parallels

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Pre-Requisites
for PostGIS
•Obvious ones (database, compiler, …)!
•PROJ4 - makes round things flat!
•GEOS - “fairly safe to upgrade”!
•LibXML2 - what may have broken!
•JSON-C - JSON support for GEO!
•GDAL - raster support
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Of the 36 strategies,
running away is the best
•Loaded in Postgres 9.1, PostGIS 1.5!
•Tried upgrade to postGIS 2.0 using
various tricks on web. Kept hitting
failures, missing bits & so on, dead
parrots from previous runs, !

•Ask Bruce & Jim
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Windows/
VMWare

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Download latest

Fixed www/phppgadmin/conf/config.inc.php to use port 5433
Ran “select

version()”

to get:

select postgis_full_version()

->
POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel.
4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15"
LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Node.js

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Fun with maps
•
•
•
MVC & mapping libraries
•
A plan, ney, a map
•

PostGIS
Javascript & node
Open source maps - MapServer, PostGIS

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Checklist
•Software downloads: node, npm, express, … !
•Setup hackable app: my what lovely stack traces
we are showing today…!

•Verify hackable’s access to postgres!
•Find & load in initial spatial data!
•Manage spatial data (leaflet)!
•Create MVC wrappers for all this GIS goodness

Installing Postgres & PostGIS on a Mac - November 20th, 2012

http://www.ashmeadsoftware.com
Recommendations
(your mileage may vary)
•Go with packages,

defaults when you can!

•If you can’t, build up in
layers.!

•Trust but verify!
•Learn a bit more than

you need to; ask around!

Installing Postgres & PostGIS on a Mac - November 20th, 2012

•Keep a log

http://www.ashmeadsoftware.com

More Related Content

What's hot

Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through ) Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through ) Mydbops
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?Mydbops
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016Dave Stokes
 
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadDevelopers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadmCloud
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesMydbops
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresqlbotsplash.com
 
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops Team
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops TeamEvolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops Team
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops TeamMydbops
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?Mydbops
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
Cassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupCassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupMichael Wynholds
 
Drupal MySQL Cluster
Drupal MySQL ClusterDrupal MySQL Cluster
Drupal MySQL ClusterKris Buytaert
 
What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6EDB
 
Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Ontico
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance OptimisationMydbops
 
What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3Pavan Deolasee
 
InnoDB Cluster Experience (MySQL User Camp)
InnoDB Cluster Experience (MySQL User Camp)InnoDB Cluster Experience (MySQL User Camp)
InnoDB Cluster Experience (MySQL User Camp)Mydbops
 

What's hot (20)

Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through ) Group Replication in MySQL 8.0 ( A Walk Through )
Group Replication in MySQL 8.0 ( A Walk Through )
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
 
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadDevelopers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
 
Postgresql
PostgresqlPostgresql
Postgresql
 
Mongodb replication
Mongodb replicationMongodb replication
Mongodb replication
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
 
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops Team
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops TeamEvolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops Team
Evolution of MonogDB Sharding and Its Best Practices - Ranjith A - Mydbops Team
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Cassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL MeetupCassandra and Rails at LA NoSQL Meetup
Cassandra and Rails at LA NoSQL Meetup
 
Postgresql tutorial
Postgresql tutorialPostgresql tutorial
Postgresql tutorial
 
Drupal MySQL Cluster
Drupal MySQL ClusterDrupal MySQL Cluster
Drupal MySQL Cluster
 
What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6
 
Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...Understanding and tuning WiredTiger, the new high performance database engine...
Understanding and tuning WiredTiger, the new high performance database engine...
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
 
What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3What’s New In PostgreSQL 9.3
What’s New In PostgreSQL 9.3
 
InnoDB Cluster Experience (MySQL User Camp)
InnoDB Cluster Experience (MySQL User Camp)InnoDB Cluster Experience (MySQL User Camp)
InnoDB Cluster Experience (MySQL User Camp)
 

Similar to Installing postgres & postgis

Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Dirk Ginader
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerOrtus Solutions, Corp
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Using the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIUsing the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIMarc Gratch
 
DocuOps & Asciidoctor in a JVM World
DocuOps & Asciidoctor in a JVM WorldDocuOps & Asciidoctor in a JVM World
DocuOps & Asciidoctor in a JVM WorldSchalk Cronjé
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaArun Ganesh
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungKAI CHU CHUNG
 
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Dirk Ginader
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
When it all GOes right
When it all GOes rightWhen it all GOes right
When it all GOes rightPavlo Golub
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07Gaia3D,Inc.
 
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...Puppet
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end WorkflowPagepro
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2portBenny Siegert
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기raccoony
 

Similar to Installing postgres & postgis (20)

Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Mongodb
MongodbMongodb
Mongodb
 
Postgis setup
Postgis setupPostgis setup
Postgis setup
 
Using the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIUsing the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLI
 
DocuOps & Asciidoctor in a JVM World
DocuOps & Asciidoctor in a JVM WorldDocuOps & Asciidoctor in a JVM World
DocuOps & Asciidoctor in a JVM World
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 
DevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChungDevFest 2022 - Cloud Workstation Introduction TaiChung
DevFest 2022 - Cloud Workstation Introduction TaiChung
 
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
When it all GOes right
When it all GOes rightWhen it all GOes right
When it all GOes right
 
Fastlane
FastlaneFastlane
Fastlane
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07
 
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...
Puppet Camp Berlin 2014 Closing Keynote: Next steps for doing more awesome th...
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2port
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 

More from John Ashmead

The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next StepJohn Ashmead
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyJohn Ashmead
 
The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next StepJohn Ashmead
 
Artificial Intelligence: Past, Present, Futures
Artificial Intelligence:  Past, Present, FuturesArtificial Intelligence:  Past, Present, Futures
Artificial Intelligence: Past, Present, FuturesJohn Ashmead
 
Time dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsTime dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsJohn Ashmead
 
Time dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionTime dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionJohn Ashmead
 
Time dispersion in quantum mechanics
Time dispersion in quantum mechanicsTime dispersion in quantum mechanics
Time dispersion in quantum mechanicsJohn Ashmead
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-ReadingJohn Ashmead
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniquesJohn Ashmead
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-ReadingJohn Ashmead
 
Stargates: Theory and Practice
Stargates:  Theory and PracticeStargates:  Theory and Practice
Stargates: Theory and PracticeJohn Ashmead
 
StarGates: Theory and Practice
StarGates:  Theory and PracticeStarGates:  Theory and Practice
StarGates: Theory and PracticeJohn Ashmead
 
Star Gates: the Theory and Practice
Star Gates:  the Theory and PracticeStar Gates:  the Theory and Practice
Star Gates: the Theory and PracticeJohn Ashmead
 
Time to the power of Tim
Time to the power of TimTime to the power of Tim
Time to the power of TimJohn Ashmead
 
How many universes are there, anyway
How many universes are there, anywayHow many universes are there, anyway
How many universes are there, anywayJohn Ashmead
 
A Quantum of Mystery
A Quantum of MysteryA Quantum of Mystery
A Quantum of MysteryJohn Ashmead
 
Converting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLConverting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLJohn Ashmead
 
Seven War Stories and a Moral
Seven War Stories and a MoralSeven War Stories and a Moral
Seven War Stories and a MoralJohn Ashmead
 

More from John Ashmead (20)

The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next Step
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quickly
 
The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next Step
 
Artificial Intelligence: Past, Present, Futures
Artificial Intelligence:  Past, Present, FuturesArtificial Intelligence:  Past, Present, Futures
Artificial Intelligence: Past, Present, Futures
 
Time dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsTime dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurements
 
Time dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionTime dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 version
 
Time dispersion in quantum mechanics
Time dispersion in quantum mechanicsTime dispersion in quantum mechanics
Time dispersion in quantum mechanics
 
Mars Or Bust!
Mars Or Bust!Mars Or Bust!
Mars Or Bust!
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-Reading
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniques
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-Reading
 
Stargates: Theory and Practice
Stargates:  Theory and PracticeStargates:  Theory and Practice
Stargates: Theory and Practice
 
StarGates: Theory and Practice
StarGates:  Theory and PracticeStarGates:  Theory and Practice
StarGates: Theory and Practice
 
Quantum dots
Quantum dotsQuantum dots
Quantum dots
 
Star Gates: the Theory and Practice
Star Gates:  the Theory and PracticeStar Gates:  the Theory and Practice
Star Gates: the Theory and Practice
 
Time to the power of Tim
Time to the power of TimTime to the power of Tim
Time to the power of Tim
 
How many universes are there, anyway
How many universes are there, anywayHow many universes are there, anyway
How many universes are there, anyway
 
A Quantum of Mystery
A Quantum of MysteryA Quantum of Mystery
A Quantum of Mystery
 
Converting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLConverting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQL
 
Seven War Stories and a Moral
Seven War Stories and a MoralSeven War Stories and a Moral
Seven War Stories and a Moral
 

Recently uploaded

Ahmedabad Escorts Girl Services For Male Tourists 9537192988
Ahmedabad Escorts Girl Services For Male Tourists 9537192988Ahmedabad Escorts Girl Services For Male Tourists 9537192988
Ahmedabad Escorts Girl Services For Male Tourists 9537192988oolala9823
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改atducpo
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilabledollysharma2066
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhulesrsj9000
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utiliseccsubcollector
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndPooja Nehwal
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptxsprasad829829
 
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfJess Walker
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfssusere8ea60
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做j5bzwet6
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...ur8mqw8e
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxJackieSparrow3
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证kbdhl05e
 

Recently uploaded (20)

Ahmedabad Escorts Girl Services For Male Tourists 9537192988
Ahmedabad Escorts Girl Services For Male Tourists 9537192988Ahmedabad Escorts Girl Services For Male Tourists 9537192988
Ahmedabad Escorts Girl Services For Male Tourists 9537192988
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilise
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptx
 
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做
 
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptx
 
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Serviceyoung Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证
 

Installing postgres & postgis

  • 1. Installing Postgres & Postgis Mostly on a Mac, but also on Linux & Windows John Ashmead
  • 2. Why? •Building a mapping website! •Wanted Postgres 9.2 to go pure Javascript: client, server (node.js), & database!! •And wanted latest & greatest mapping Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 3. Objective •Postgres 9.2! •Postgis 2.0 http://www.postgis.org/! •psql, pgAdmin3, & phpPgAdmin! •Node.js! •PL/Javascript Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 4. Stack Builder Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 5. Strategies •EnterpriseDB - provides Stack Builder not currently current, but good starting point! •DMGs - not always current, but good intel! •Open source: fink, homebrew, macports - can be hacked, instructive Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 6. EnterpriseDB % sudo vi /etc/sysctl.conf ! On a MacBook Pro with 2GB of RAM, the author's sysctl.conf contains: ! kern.sysv.shmmax=1610612736 kern.sysv.shmall=393216 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.maxprocperuid=512 kern.maxproc=2048 Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 7. Kyngchaos •Stackbuilder! •Not quite current: when did first, was Postgres 9.1, PostGIS 1.5. (Now is 9.1, but 2.0.0)! •But lots of good information, i.e. PostGIS has lots of dependencies: geos, proj4, some others Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 8. Xcode Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 9. Open source packagers •Fink - precompiled binaries preferred. Not as up to date. Not current enough.! •Homebrew - easier to use. On github. Uses ruby. Less intrusive. Assumes single user.! •Macports - tends to pull a lot of stuff down. Possibly more general. Used here. http:// www.macports.org/ Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 10. Portfiles https://trac.macports.org/browser/trunk/dports/databases/ postgis2/Portfile variant postgresql92 description {Builds with postgresql 9.2} conflicts postgresql90 postgresql91 { depends_lib-append port:postgresql92 archcheck.files-append lib/postgresql92/libpq.dylib configure.args-append --libdir=${prefix}/lib/postgresql92 --with-pgconfig=${prefix}/lib/ postgresql92/bin/pg_config build.args-append PGSQL_DOCDIR=${destroot}${prefix}/ share/doc/postgresql91 PGSQL_MANDIR=${destroot}${prefix}/ share/man } ! Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 11. Port commands port list > /dev/null Warning: port definitions are more than two weeks old, consider using selfupdate port selfupdate [ port upgrade postgresql92 skipped ] port -v install postgresql91 +perl +tcl +python port -v install postgresql91-doc port install pgAdmin3 +postgresql91 +with_postgresql91 port install postgis2 +postgresql91 +raster +gui +topology Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 13. Launch Daemons Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 14. Processes 507 7714 1 0 5:22PM ?? 0:00.04 /Library/ PostgreSQL/9.2/bin/postmaster -D/Library/PostgreSQL/9.2/data 507 7715 7714 0 5:22PM ?? 0:00.00 postgres: logger process 507 7717 7714 0 5:22PM ?? 0:00.01 postgres: checkpointer process 507 7718 7714 0 5:22PM ?? 0:00.05 postgres: writer process 507 7719 7714 0 5:22PM ?? 0:00.03 postgres: wal writer process 507 7720 7714 0 5:22PM ?? 0:00.05 postgres: autovacuum launcher process 507 7721 7714 0 5:22PM ?? 0:00.07 postgres: stats collector process ~ Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 15. Profile variables vi .profile # to change back to Postgres 9.1, fix path & set PGPORT to 5432, export PATH=".:/opt/local/lib/postgresql92/bin:/Library/ PostgreSQL/9.2/bin:$PATH” ! export PGDATABASE=talkinvite export PGUSER=talkinvite export PGPORT=5433 vi apache/conf/httpd.conf # ServerRoot "/Library/PostgreSQL/EnterpriseDB-ApachePHP/apache" # Listen: Allows you to bind Apache to specific IP addresses and/ # Listen 8081 vi phpPgAdmin/conf/config.inc.php # to change back to Postgres 9.1, fix path & set PGPORT to 5432, // Database port on server (5432 is the PostgreSQL default) // Using 5433 for Postgres 9.2 $conf['servers'][0]['port'] = 5433; Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 16. Verify •Check psql, pgAgent3, pgPhpAdmin (using apache)! •Bounce box, make sure it comes back! •Hand save some simple maps, then recover Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 17. Linux/Parallels Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 18. Pre-Requisites for PostGIS •Obvious ones (database, compiler, …)! •PROJ4 - makes round things flat! •GEOS - “fairly safe to upgrade”! •LibXML2 - what may have broken! •JSON-C - JSON support for GEO! •GDAL - raster support Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 19. Of the 36 strategies, running away is the best •Loaded in Postgres 9.1, PostGIS 1.5! •Tried upgrade to postGIS 2.0 using various tricks on web. Kept hitting failures, missing bits & so on, dead parrots from previous runs, ! •Ask Bruce & Jim Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 20. Windows/ VMWare Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 21. Download latest Fixed www/phppgadmin/conf/config.inc.php to use port 5433 Ran “select version()” to get: select postgis_full_version() -> POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 22. Node.js Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 23. Fun with maps • • • MVC & mapping libraries • A plan, ney, a map • PostGIS Javascript & node Open source maps - MapServer, PostGIS Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 24. Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 25. Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 26. Checklist •Software downloads: node, npm, express, … ! •Setup hackable app: my what lovely stack traces we are showing today…! •Verify hackable’s access to postgres! •Find & load in initial spatial data! •Manage spatial data (leaflet)! •Create MVC wrappers for all this GIS goodness Installing Postgres & PostGIS on a Mac - November 20th, 2012 http://www.ashmeadsoftware.com
  • 27. Recommendations (your mileage may vary) •Go with packages, defaults when you can! •If you can’t, build up in layers.! •Trust but verify! •Learn a bit more than you need to; ask around! Installing Postgres & PostGIS on a Mac - November 20th, 2012 •Keep a log http://www.ashmeadsoftware.com

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. Had a first pass, spent quite a few hours working this out, got up to 9.1 + 2.0.1\n\nFor this talk, walked up to 9.2, checked what status is now\n\nExpert on UNIX sysadm &amp; databases, but not on postgres\n
  5. As to databases, have used a lot. \nFor open source, have like violins: SQLite, MySQL, Postgres\nPostgres 9.2 has JS internally, so with node.js can run js on client, server, &amp; database. Sweet.\n20\nHad previously installed 9.1. On an iMac with 20GB memory.\n
  6. No postgis extension!\nTried copying the postgis-2.0 to /Library/PostgreSQL/9.2/lib, didn&amp;#x2019;t help\nUsed pg_config to figure out that $libdir was /Library/PostgreSQL/9.2/lib\nIs server needed for 9.2?\nWhy can&amp;#x2019;t it find postgis-2.0 in $libdir when it is there\n\n\n\n
  7. \n
  8. \n
  9. There are lots postGIS dependences listed there:\n\n
  10. \n
  11. http://tedwise.com/2010/08/28/homebrew-vs-macports/\n\nFink puts stuff in /sw; have used a lot; didn&apos;t want to talk to me just now: pdb.finkproject.org\n\nthere is also http://www.pkgsrc.org/\n\n\n\n\n\n\n\n
  12. \n
  13. Problem is that it doesn&amp;#x2019;t hook stuff up, so have to have apache setup, launchd, and so on.\nFortunately enterprisedb does all this\n\n7412 lines later on the postgis2 upgrade! :)\n\nInstalls files in /opt/local/var/macports and various sub directories of this\n\nNow at 9.1 + 2.0.1, want to go to 9.2 + 2.0.1!\n-- so we have javascript!\n\n \n\n\n\n\n
  14. \n
  15. Port installs a program called daemondo wrappers the package in a way that works well with mac&apos;s launchd.\n\nNot needed for postgres since there is only one command, portmaster, to be run\n\nnot needed for postgis, since that installs as an extension within postgres\n\nso replaced call to daemondo with direct call on postmaster, less kruft\n\non first install, use port install package name, on subsequent should use port upgrade package name(s)\n\n\n\n\n\n\n
  16. \n
  17. \n
  18. \n
  19. Ubuntu software center &amp; postgres\n\napparnetly you have to sudo to run a run command, using own passowrd!\n\nadding in apache &amp; also phpPgAdmin\n\ndownloaded postgres &amp; sudo&apos;d &amp; ran the .run file\n\ndid apt-get postgis\n\nrebuild from source ran into lots of missing pieces, i.e. xml-config\n\nhttp://linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu\n\nTrick was to go back to 9.1, then load in\nThen, load in tricks for 9.1\npushed to 9.2, but wroking on Mac\n\n
  20. \n\n\n
  21. A lot, ran into a series of fails on the compile, finally just gave up\nOne problem is that some tools not careful about where they litter: copies of &amp;#x201C;createdb&quot; in /usr/local a major problem: always check tools &amp; fix in the .profile\nThe configure broke: \n\nhad trouble with the createdb -- but still seems to have worked! as a postgis_template database had come into existence\nused scripts/launchpgadmin.sh to kick off a pgAdmin shell; preferred sudo\nbrought parallls up to rev\nfixed PGPORT using variable (&amp; pgpass) to 5432 (had been thinking it was 5433 -- this was all the low level tools, as psql)\nadded show_system =- true to get phpPgAdmin to work\nahd a lot of trouble with wronge createdb, until realize had to fix paths: see pg_env.sh &amp; . include that\nselect postgis_full_version(); - in a database to check\n\n\nselect oid, datname, datistemplate from pg_database;\ndrop database template_postgis2\n\nattempt to recompile from source died on some error messages about xml config, some more in the works\n-- tried various sources, but got things like createdb failures\n-- instructions basically require two things: 1) build from source all the way up 2) know what you are doing. Don&apos;t mind one, but two is a killer\n\nfigured I&apos;d just ask Jim &amp; Bruce\n\nCould have used a &quot;these are the big pieces&quot; cheat sheet; may even exist\n\nA lot of libraries have to be compiled into the tree; could walk up from ground but just poking at the problem is an issue.\n\n\n\n\n\n
  22. \n
  23. Downloaded 9.1 &amp; installed\nFound 9.2 already had postgis 2.0! Great -- one strategy is just to wait!\nBecause had already installed 9.1, was using port 5433 for postgres 9.2\nSo had to fix the phppgadmin/conf/config.inc.php file, to have it go to port 5433\nAfter a bit of futzing with the permissions, was up\nRan select version()\n\n\n\n
  24. \n
  25. PostGIS+JSON+Maps+Open+source\n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. And if you are prepping a demo for others:\n1) make it standalone\n2) test soup to nuts\n
  44. \n