Installation instructions for libremap on Debian sid/jessie.
- CouchDB and GeoCouch installation
- libremap-api installation
- libremap-webui installation
- Creating a node
CouchDB and GeoCouch installation
We will need to compile 'geocouch' manually, since it is not yet packaged in Debian.
Install dependancies to build geocouch from source:
sudo apt-get install build-essential erlang libicu-dev
libmozjs-17.0-dev libcurl4-openssl-dev libtool automake checkinstall couchdb
libmozjs-17.0-dev libcurl4-openssl-dev libtool automake checkinstall couchdb
Install the couchdb source:
mkdir ~/src cd ~/src apt-get source couchdb
Download the geocouch source:
cd ~/src git clone https://github.com/couchbase/geocouch.git
Compile (NB: change 1.4.0 below to the version you downloaded):
cd ~/src/geocouch/ export COUCH_SRC=~/src/couchdb-1.5.0/src/couchdb git checkout couchdb1.3.x make
NB: as of 2013-12, Debian unstable had CouchDB 1.4, although CouchDB 2.x now exists. GeoCouch must be built against the same version of CouchDB. There wasn't a 1.4 branch of geocouch, but it seems to compile correctly with the 1.3 branch, To see the available GeoCouch branches available, type "git branch -v -r".
After compilation, you probably want to install it somewhere outside a user directory, ex:
sudo cp -r ebin /usr/local/lib/couchdb-geocouch
And tell erlang ("man erl") to add that to the "code path". In Debian, this can be done in the /etc/default/couchdb file:
export ERL_FLAGS="-pa /usr/local/lib/couchdb-geocouch"
Restart couchdb to make sure everything is OK:
sudo service couchdb stop ps aux | grep couchdb sudo kill -9 [...] sudo service couchdb start
(on Debian jessy, as of 2013-12, doing a restart does not really restart couchdb, because couchdb keeps respawning itself automatically; TODO: is there a bug report open about this already?)
References:
- https://github.com/couchbase/geocouch/
- http://wiki.openstreetmap.org/wiki/OSMCouch#CouchDB_and_GeoCouch
libremap-api installation
This assumes that you have completed the GeoCouch installation.
Install the requirements for libremap-api:
sudo apt-get install nodejs sudo npm install -g grunt-cli
NB: npm installs modules to /usr/local/lib/node_modules/.
Install libremap-api:
cd ~/src/
git clone git://github.com/libremap/libremap-api.git
cd libremap-api
npm install
sudo npm -g install npm@next
Create a CouchDB database:
- access http://localhost:5974/utils/ (if you are not working locally, edit your /etc/couchdb/default.ini and change the "bindaddress" in the 'httpd' section, then restart couchdb)
- create an admin account by clicking on the link in the lower-right corner of the screen (more info: http://www.youtube.com/watch?v=oHKvV3Nh-CI)
- (I could not really figure out how users work in CouchDB, so just moved on to the next step, expecting permissions problems, but it didn't make much of a difference, maybe the admin account was still wide open)
- in ~/src/libremap-api, copy the file 'couch.json.example' to couch.json
- change the configuration to match yours.
No hay comentarios:
Publicar un comentario