Cherokee

From OpenStreetMap Wiki
Jump to: navigation, search

Cherokee is a very fast, flexible and easy to configure web server.

Building Cherokee

If you want to use MonetDB Handler OSM, you need to build Cherokee from SVN and apply some patches. You need libmysqlclient-dev because configure will check for MySQL header files before it builds the DBSlayer.

Check out from SVN and build it:

# dependencies: gettext libmysqlclient-dev

svn co svn://svn.cherokee-project.com/cherokee/trunk cherokee &&
cd cherokee &&
./autogen.sh --prefix=/opt/cherokee &&
make &&
make install

or build from the latest release:

# dependencies: gettext libmysqlclient-dev

wget http://www.cherokee-project.com/cherokee-latest-tarball &&
gunzip cherokee-*.tar.gz &&
cd cherokee-*/ &&
./configure --prefix=/opt/cherokee &&
make &&
make install

Before running autogen/configure, apply the patches:

cd cherokee
patch -i /path/to/handler_tile.patch
patch -i /path/to/handler_osm.patch

Note that the MonetDB installation path is hardcoded in the patches. Please make sure it is the correct path.

Configuring Cherokee

Configure Cherokee from your browser. First, run

/opt/cherokee/sbin/cherokee-admin

Then you can access http://localhost:9090/ or access the server configuration from another machine using port forwarding:

ssh -L 9090:localhost:9090 yourserverip

or if you feel lucky, add the -b option to cherokee-admin, which makes it accessible from the network.


Configure dbslayer manually, similar to this:

vserver!1!rule!60!disabled = 0
vserver!1!rule!60!encoder!gzip = allow
vserver!1!rule!60!expiration = time
vserver!1!rule!60!expiration!time = 5m
vserver!1!rule!60!handler = dbslayer
vserver!1!rule!60!handler!type = monetdb
vserver!1!rule!60!handler!balancer = round_robin
vserver!1!rule!60!handler!balancer!source!1 = 1
vserver!1!rule!60!handler!db = planet
vserver!1!rule!60!handler!lang = json
vserver!1!rule!60!handler!user = dbslayer
vserver!1!rule!60!handler!password = dbslayer123456
vserver!1!rule!60!handler!read_only = 1
vserver!1!rule!60!no_log = 0
vserver!1!rule!60!match = directory
vserver!1!rule!60!match!directory = /dbslayer
vserver!1!rule!60!match!final = 1
vserver!1!rule!60!match!fullpath!1 = /dbslayer

source!1!type = host
source!1!host = localhost:5000
source!1!nick = MonetDB