maposmatic/INSTALL

83 wiersze
2.5 KiB
Plaintext
Czysty Wina Historia

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

INSTALLATION NOTES
==================
Dependencies
------------
MapOSMatic depends on :
* Python, the programming language
* Django, the Web framework used to develop the Web front-end, but
also used for the maposmaticd daemon to conveniently access the
database through Django's ORM
* python-psycopg2, to let Django access the PostgreSQL database
* python-feedparser, to parse the MapOSMatic blog feed and display
the latest entries on the main MapOSMatic website
* python-imaging, to render PNG maps.
* gettext, for internationalization.
* JSON (any python-*json package should work).
You will also most likely need a working PostGIS installation for the
entire pipeline to run. See the INSTALL documentation of OcitySMap for
more details.
Setup
-----
The www/ directory contains the Django web application. The file
www/settings_local.py-template must be copied to www/settings_local.py and
modified to match your installation configuration.
Check DEFAULT_MAPOSMATIC_LOG_FILE is writable by the web server. For
example:
sudo chgrp www-data /path/to/maposmatic/logs/maposmatic.log
sudo chmod 664 /path/to/maposmatic/logs/maposmatic.log
Likewise for www/maposmatic.wsgi-template and
scripts/maposmaticd.sh-template.
The database must then be initialized with the tables needed for MapOSMatic,
using :
python www/manage.py syncdb
The rendering daemon should be run in the background. It will fetch rendering
jobs from the database and put the results in a directory, as specified in the
settings_local.py file.
To setup the daemon, you need to configure the wrapper in the scripts/
directory by copying scripts/config.py-template to scripts/config.py and
editing it to match your setup. The wrapper will set the necessary environment
variables and paths for the daemon to run correctly.
Then, you can run the rendering daemon through the wrapper with:
.../scripts/wrapper.py scripts/daemon.py &
You'll find in support/init-maposmaticd-template an init script template that
you can tweak and install on your machine to start the MapOSMatic rendering
daemon automatically at boot time.
Web server configuration
------------------------
For Apache, you can adapt the configuration file given in
support/apache-maposmatic-template.
Internationalization
--------------------
To get proper internationalisation, you need to compile the gettext locale files:
django-admin compilemessages
Don't forget to restart the Django server or it won't pick up the new
translated strings!