public
Description: Free text geocoder
Homepage: http://fetegeo.org/
Clone URL: git://github.com/ltratt/fetegeo.git
fetegeo / INSTALL
100644 65 lines (43 sloc) 2.146 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
============================================================================
  Fetegeo Installation Guide
============================================================================
 
 
To install Fetegeo you need to have Python installed (tested with 2.5.4) and
a database and database connector. Currently only PostgreSQL is supported;
any DB API compatible database connector (e.g. PyGreSQL) should work.
 
To install, copy Fetegeo to your desired location. You then need to populate
the database. Assuming you have a PostgreSQL database up and running the
following two commands:
 
  $ cd import
  $ ./postgres_geonames.sh
 
are the easiest way to import data. Note that running "postgres_geonames.sh"
will create a database called fetegeo (and will wipe a database of that name
if it exists). Importing the data is likely to take a while; however you
can start testing with incomplete data as soon as Fetegeo has imported a
couple of countries worth of data.
 
fetegeos is the Fetegeo server. In order to set this up, you need to give it
a valid config file. A sample config file is included with the distribution
and can be moved into place with:
 
  $ cp fetegeos.conf.sample fetegeos.conf
 
The easiest way to test things is to run the server fetegeos in one shell:
 
  $ ./fetegeos
 
and in another shell run either the test suite:
 
  $ cd tests
  $ python testall.py
 
or use the command-line client fetegeoc:
 
  $ fetegeoc geo <place name>
 
 
 
  PostgreSQL tips
 ===============
 
If you do not have a PostgreSQL database up and running you can create one
with:
 
  $ initdb -D data
 
where 'data' is the name of a directory (which PostgreSQL will create) and
which will be the database store.
 
Postgres's default settings can make importing data cripplingly slow (with
imports taking many hours). Fiddling with the options in the
data/postgresql.conf file can make a huge difference. On a 2Gb machine, for
example, I set the following options for import:
 
  shared_buffers = 512MB
  checkpoint_segments = 50
  effective_cache_size = 768MB
 
During normal operation, these aren't anywhere near as important, but for
import they lead to a big speedup.