This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

mapnik and postgresql in differents servers

1

I have installed:

on a server: mapnik, openstreetmap-carto and mod_tile in apache2

in another: postgresql, postgis

where I have to put the connection parameters to the database: user, password, host, port, ...

I tried:

 set | grep MAPNIK
MAPNIK_DBHOST=192.168.1.1
MAPNIK_DBNAME=gis
MAPNIK_DBPASS=xxxxxxxx
MAPNIK_DBPORT=5432
MAPNIK_DBUSER=userdb

with the same result

Do I have to install Mapnik-style (default) Or there somewhere to register values?

asked 18 Aug '16, 16:08

arcadio%20ortega's gravatar image

arcadio ortega
41456
accept rate: 0%

edited 18 Aug '16, 16:52


One Answer:

1

I've never run Postgres on a different server, but I think you'd have to change the osm2pgsql connection settings inside the openstreetmap-carto project.

Add a host/user/etc value to this part:

  osm2pgsql: &osm2pgsql
    type: "postgis"
    dbname: "gis"
    key_field: ""
    geometry_field: "way"
    extent: "-20037508,-20037508,20037508,20037508"

See also: Mapnik's PostgreSQL settings.

The openstreetmap-carto style makes use of some shapefiles, you will need to have them locally on the mapnik server, not the postgresql server.

answered 19 Aug '16, 07:51

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

I execute "carto project.mml > osm.xml" if I change something in project.yaml then nothing changes in osm.xml and everything stays the same.

(19 Aug '16, 08:12) arcadio ortega

Where I add this: PostGIS_user-content-usage-from-c it can be the solution

(19 Aug '16, 10:10) arcadio ortega