techwars: dialog improvements, debug() js, game update loop!, lots of comments, new...
[limo.git] / INSTALL.txt
blob8040fe6974f773c450cdfb7a42a64a7371dbae44
2 Python modules required:
3         - Make sure you have setuptools installed (for easy_install)
4         - BeautifulSoup - to prettify HTML
5                 easy_install BeautifulSoup
6         - MySQLdb - the python module for connecting to mysql
7                 Try: easy_install MySQLdb; at the time of this writing this was not available
8           # Download OS libraries and headers, e.g. Debian:
9                 apt-get install libmysqlclient-dev
10                 # TODO: What do you need to make this install on python-win32?
12                 # Build the python module
13                 cd ~
14                 wget http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.tar.gz
15                 tar xzvf MySQL-python-1.2.2.tar.gz
16                 cd MySQL-python-1.2.2
17                 python setup.py install
19         - PIL - Python Imaging Library
20                 cd ~
21                 wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz
22                 tar xzvf Imaging-1.1.6.tar.gz
23                 cd Imaging-1.1.6
24                 python setup.py install
26         - APSW - Another Python SQLite wrapper
27                 . build sqlite3 (> 3.6.2)
28                         cd ~
29                         wget http://www.sqlite.org/sqlite-amalgamation-3.6.3.tar.gz
30                         tar xzvf sqlite-amalgamation-3.6.3.tar.gz
31                         cd sqlite-3.6.3
32                         ./configure --prefix=/usr
33                         make
34                         make install
35                 . build apsw
36                         cd ~
37                         svn co http://apsw.googlecode.com/svn/apsw/trunk apsw
38                         cd apsw
39                         python setup.py install
41 (Optional: on an OS where lighttpd's binaries are out of data or unavailable).
42 Build Lighttpd:
43         wget http://www.lighttpd.net/download/lighttpd-1.4.20.tar.gz
44         tar xzvf lighttpd-1.4.20.tar.gz
45         cd lighttpd-1.4.20
46         ./configure --prefix=/usr
47         NOTE: (If you want ssl here, include:
48                 --with-openssl --with-open-ssl-libs=/usr/lib
49           in the configure command line.  You must have openssl installed.)
50         make
51         sudo make install
53 Configure Lighttpd:
54   1. Add the following lines in lighttpd.conf (replace /opt/limo with the path to where you checked out the limo source):
56         server.modules   += ( "mod_fastcgi" )
57         fastcgi.debug = 1
58         fastcgi.server  = ( "" => 
59                 ( "" =>
60                         (
61                                 "bin-path" => "/opt/limo/limo.py",
62                                 "max-procs" => 6,
63                                 "socket" => "/tmp/limo.sock",
64                                 "check-local" => "disable",
65                         )
66                 )
67         )
69         2. Alter this config. 
70          - Replace /opt/limo, and /tmp, with paths appropriate for your installation.
71          - Also, on a development server, set max-procs = 1, to speed up start-up times.
73 Configure Datasources:
74   1. Edit db.cfg
75         Each line is a database url in the following format:
76         <datasource-name>=mysql://<login>:<password>@<host>:<port>/<database>
78         You should have at least one entry, named 'default'.
80         You can put multiple entries here, and then in code refer to them by name:
81         Query("select * from foo", dsn="some_other_dsn")