cyclestreets / nominatim-install Goto Github PK
View Code? Open in Web Editor NEWBash script to install Nominatim
Bash script to install Nominatim
The script currently assumes 12.04. We need to install it on a 14.04 box soon.
The postgres version listed in the package list on the wiki is now postgresql-9.3-postgis-2.1, so that will need to be updated in the script also.
Running the script inside a debian docker container leads to:
./run.sh: 128: ./run.sh: sudo: not found
Tried to install Nominatim using these scrips here on a vagrant box. But the script fails trying to create the links for the munin stuff at https://github.com/cyclestreets/nominatim-install/blob/master/run.sh#L194
None of the files are available on my machine. munin-node-configure
is unknown as well. Does the script assume a munin node being installed for this?
sysctl: permission denied on key 'vm.swappiness'
sysctl: permission denied on key 'vm.overcommit_memory'
./configPostgresql.sh: 255: ./configPostgresql.sh: cannot create /proc/sys/vm/dirty_ratio: Permission denied
root@uhd7m04pcs:~/nominatim-install# sh run.sh
# Nominatim installation Tue Jul 22 18:57:18 EDT 2014
# Import and index OSM data in progress, follow log file with:
# tail -f /root/nominatim-install/setupLog.txt
# User nominatim exists already and will be used.
# Postgresql configuring based on system memory and recommended formulae
# Configuring as usage type: oltp, Dedicated PostgreSQL server: n, override_maintenance_work_mem:
# Backing up original config file to /etc/postgresql/9.1/main/postgresql.conf.BACKUP
# Backing up /etc/sysctl.conf to /var/lib/postgresql/sysctl.conf.BACKUP
# Configuring for system type: Linux, max memory: 1572864 kB, page size: 4096 bytes, working memory 4MB.
# Checking the current kernel's shared memory settings...
# Setting virtual memory sysctls
sysctl: permission denied on key 'vm.swappiness'
sysctl: permission denied on key 'vm.overcommit_memory'
./configPostgresql.sh: 255: ./configPostgresql.sh: cannot create /proc/sys/vm/dirty_ratio: Permission denied
root@uhd7m04pcs:~/nominatim-install#
I am using Ubuntu 14.04 VM on DigitalOcean wtih 8GB of RAM. But the setup fails after downloading many packages. Here is the error message:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error: 1. Re-trying: /usr/local/bin/osmosis -q --read-replication-lag workingDirectory=/home/nominatim/Nominatim/settings in 900 secs
Here is my .config.sh
#!/bin/sh
# Contains credentials
# This is a template file, save as simply .config.sh (amd make executable) and set your own values below.
# System language
utf8Language=en_GB
# Define the website hostname and e-mail for the VirtualHost
# Several option groups here, comment in / out as necessary
# Localhost
websiteurl=nominatim.localhost
emailcontact=nominatim@localhost
# CycleStreets
#websiteurl=nominatim.cyclestreets.net
#emailcontact=webmasterATcyclestreets.net
# Define the username for Nominatim to install/run under, so that it can run independent of any individual personal account on the machine
username=nominatim
password=password
# Apache virtual host configuration file name - with .conf extension
nominatimVHfile=400-nominatim.conf
# Wikipedia rankings
# Default is yes. To turn off this feature leave as blank.
includeWikipedia=yes
# Set up the website for use with Apache
wwwNominatim=/websites/www/nominatim
### SETTINGS ###
# Define either a full planet, or an extract by commenting in the relevant sections
## Full Planet
# On a machine with 1.2TB disk, 32 GB RAM, Quad processors - it took 10 days to run and used about 700GB. (December 2013)
#planetUrl=http://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf/
#postgresconfigmode=dw
#override_maintenance_work_mem=10GB
# 24GB is recommended for full planet import (arg value is in MB)
#osm2pgsqlcache="--osm2pgsql-cache 24000"
## Geofabrik Extract
# If planetUrl is an empty string that tells the install script to configure for Geofabrik extract
planetUrl=
geofabrikUrl=http://download.geofabrik.de/
postgresconfigmode=oltp
override_maintenance_work_mem=
# Default cache size
# Seemed to be necessary to use cache as small as 512MB on a VM that had 2GB RAM.
osm2pgsqlcache="--osm2pgsql-cache 512"
# Define the location of the .pbf OSM data file; -latest.osm.pbf will be appended automatically
# Several option groups here, comment in / out as necessary
# Andorra (install, without wikipedia data, takes 12 minutes)
# Test street: Andorra la Vella
osmdatafolder=asia/
osmdatacountry=taiwan
Running the script in a debian8 docker container leads to:
ln: failed to create symbolic link '/etc/munin/plugins/nominatim_importlag': No such file or directory
When trying to build (not within Docker), it fails with the following last several lines:
checking for lseek64... yes
checking for posix_fallocate... yes
checking for posix_fadvise... yes
checking for sync_file_range... yes
checking for fork... yes
checking for Expat XML Parser... no
configure: error: required library not found
configure: error: ./configure failed for osm2pgsql
I'm running Ubuntu 14.04.1 with 3.16.0-46-generic kernel.
When importing europe, I see the following:
2014-03-21 13:02:14 (43.2 MB/s) - 'data/europe-latest.osm.pbf' saved [12987620407/12987620407]
NOTICE: database "nominatim" does not exist, skipping
DROP DATABASE
createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
ERROR: Error executing external command: createdb -E UTF-8 -p 5432 nominatim
psql: FATAL: database "nominatim" does not exist
I run in a fresh docker container running ubuntu.
Hi there!
the script successfully creates user nominatim, gets source files from git and configures them,
after some time asks fore entering password
Password:
Password:
Password:
I enter password that I alredy set previously but nothing happens..
and sometimes give me erros like:
createdb: could not connect to database template1: FATAL: password authentication failed for user "nominatim"
or
ERROR: DB Error: connect failed
what can I do?
These munin charts relate to my question at:
https://lists.openstreetmap.org/pipermail/geocoding/2013-November/001037.html
I've added a few of the munin charts that hopefully illustrate the problem.
Trying to test and study Nominatim in VM 4GB with Andorra data, but always got errors
Java -version after exeption says:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is it possible to set minimal parameters for playing with Nominatim?
Some data repositories it seems do not have an MD5 file associated with the download:
dartov@eebed64
xivk@b2664be
Enable the check to be disabled.
When trying to build the Docker image, the build fails with a host of errors throughout the build process, see below.
Note, I realize the JVM error might be related to Issue #22 however I can't do much about the swap space or the .profile configuration during the build process.
Any help in being able to build nominatim, either standalone or Docker would be appreciated!
invoke-rc.d: policy-rc.d denied execution of start.
update-initramfs: deferring update (trigger activated)
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found.
invoke-rc.d: policy-rc.d denied execution of start.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error occurred during initialization of VM
Could not reserve enough space for object heap
ignoring dump failure
(gconftool-2:5064): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Hi and thank you for your script.
I get this error when trying to install Nominatim for the first time in Ubuntu 12 with 4GO RAM and 320 GB of disk space. I want just use it for one or two countries.
The installation gives me this error:
Allocating memory for sparse node cache
Out of memory for sparse node cache, reduce --cache size
Error occurred, cleaning up
ERROR: Error executing external command: /home/nominatim/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 3207 -P 5432 -d nominatim /home/nominatim/Nominatim/data/europe/andorra-latest.osm.pbf
So I modified : .config.sh > [osm2pgsqlcache="--osm2pgsql-cache 2000"] for 2000MB only.
After reexecuting run.sh I get this error:
Makefile:10: warning: overriding commands for target install' /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk:116: warning: ignoring old commands for target
install'
DROP DATABASE
psql: FATAL: database "nominatim" does not exist
The content of mu .config.sh file is the following:
http://codepad.org/HVH8Ec3e
Please advice.
It tells me:
./configPostgresql.sh: 151: ./configPostgresql.sh: bc: not found
and installing bc fixes the problem
Ran the check against the whole planet download manually and the hash is an exact match to the MD5 file.
The script fails reporting the MD5 check failed.
ln: failed to create symbolic link '/etc/munin/plugins/nominatim_importlag' : No such file or directory
Package install section should make sure that sudo installed
Running the script inside a debian docker container leads to:
./run.sh: 100: ./run.sh: wget: not found
Would be nice to have the option to use either nginx or apache.
Any preference of implementation for this? I'm thinking a new setting in .config.sh
lets say httplistener=
perhaps...
@cyclestreets any thoughts/concerns/objections/etc?
Running the script in a debian8 docker container leads to:
E: Unable to locate package postgresql-9.3-postgis-2.1
E: Couldn't find any package by regex 'postgresql-9.3-postgis-2.1'
E: Unable to locate package postgresql-server-dev-9.3
E: Couldn't find any package by regex 'postgresql-server-dev-9.3'
Implement this commit present in a fork by @nicopace:
nicopace@870b21b
as an option, so that they can avoid using a fork.
Ubuntu 16.04 Server LTS is now out and stable.
Other CycleStreets script at
https://github.com/cyclestreets/cyclestreets-setup
have been migrated without problems, and have not involved many changes.
Hi. I'm wondering if I can use this to set up an automatically updating planet-wide Nominatim. My Ubuntu Cloud 12.04.2 LTS 64-bit server is 8 cores, 64GB ram with a 1TB drive, though I can increase those parameters, if absolutely necessary.
Also, I already obtained the planet pbf file, via torrent. Is there an easy way to override the downloading option, in lieu of this?
Thanks,
Joshua
I have installed nominatim but error gets for connecting to DB,i run even the import and it worked,but cannot see interface.any help
string(19) "pgsql://@/nominatim" object(DB_Error)#2 (8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> int(-24) ["message"]=> string(24) "DB Error: connect failed" ["userinfo"]=> string(239) " [nativecode=pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?] **
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.