1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
- Install postgres and create a 'geonames' database.
- Create a geouser account with password geopw
- Run import-geonames.sh
+ it downloads & populates the database
+ grants slightly excessive permissions to geouser for queries
- Install sphinxsearch and configure (/etc/sphinxsearch/sphinx.conf ) from universe.
+ run $ sudo indexer geonames
+ Enable /etc/default/sphinxsearch
+ start $ sudo service sphinxsearch start
- Install sphinxapi-python from ppa:~ev and use or modify the sphinx.conf
provided.
- Install python-psycopg2
- Install Apache and mod_python, then copy geoname-modpython.py
to /var/www and edit the apache configuration:
<Directory /var/www/>
AddHandler mod_python .py
PythonHandler geoname-modpython
DirectoryIndex geoname-modpython.py
</Directory>
- test http://localhost:1234/?query=New%20York
- check apache error.log
|