root/livinglogic.python.aplora/INSTALL.rst @ 24:bfa98617aa70

Revision 24:bfa98617aa70, 1.9 KB (checked in by Walter Doerwald <walter@…>, 12 years ago)

Use package_data instead of data_files. Fix text role.

Line 
1Requirements
2============
3
4To use this script you need the following software packages:
5
6    1.  Python_ (any version supported by cx_Oracle should do);
7    2.  Apache_ (2.0.46 or later, although it's possible to get it to work with
8        Apache 1.3 by removing a few of the fields);
9    3.  cx_Oracle_ (4.3 or later);
10
11    .. _Python: http://www.python.org/
12    .. _Apache: http://httpd.apache.org/
13    .. _cx_Oracle: http://www.python.net/crew/atuining/cx_Oracle/
14
15
16Installation
17============
18
19distutils is used for installation, so it's rather simple. Execute the following
20command::
21
22    $ python setup.py install
23
24This will copy aplora.py to ``/usr/local/bin``. If you want to install the
25script somewhere else you can use the :option:`--install-scripts` option.
26
27There is no Windows binary.
28
29To create the database table and the stored procedure use ``aplora.sql``.
30
31If you have difficulties installing this software, send a problem report
32to Walter Dörwald (walter@livinglogic.de).
33
34
35Configuration
36=============
37
38First you have to define the logging format to be used by aplora. Put
39the following two lines into your ``httpd.conf``::
40
41    LogFormat "%v\t%{%s}t\t%D\t%a\t%{User-Agent}i\t%U\t%q\t%m\t%>s\t0\t0\t%B\t%{Referer}i\t%{Content-Type}o\t%{JSESSIONID}C\t%{Set-Cookie}o" aplora
42    CustomLog "|/usr/local/bin/aplora.py -o ORACLE_HOME -c user/pass@db -p log_insert" aplora
43
44Replace ``ORACLE_HOME`` with the content of your ``ORACLE_HOME`` environment
45variable (e.g. ``/oracle/Client``) and ``user/pass@db`` with the appropriate
46connect string. The option :option:`-p` can be used to specify a different
47insert procedure.
48
49Note that this will only work for virtual hosts, if they don't have a
50``CustomLog`` or ``ErrorLog`` directive. In this case you have to add the
51``CustomLog`` specification from above to each virtual host section. This means
52that you will have more aplora jobs running and more database connections will
53be consumed.
Note: See TracBrowser for help on using the browser.