INSTALL
author fabien
Sat, 27 Sep 2003 03:17:30 -0400
branchxbelweb
changeset 26 17b0cd274530
parent 20 8c201fa3bdc7
child 28 f34f8083c1ed
permissions -rw-r--r--
[svn r1560] Add import functionality and correct a bug in the merge_kw.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     1
These instructions assume that you have the following working
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     2
together: Web Server, database and Python.  I personnaly used
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     3
this configuration for my testing.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     4
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     5
- Apache Web Server (http://www.apache.org/).  Currently, the
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     6
  only to restrict access to your code, is to used the web server
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     7
  authentification.  With apache, I used the AuthType Basic and
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     8
  Limit/require instruction for doing so.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
     9
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    10
- PostgreSQL (http://www.postgresql.org).  I try to make my code
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    11
  SQL-92 compliant but currently, only test it on PostgreSQL.  The
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    12
  code can show strange behavior and be corrupt especially if your
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    13
  server doesn't support transaction on UPDATE.  Also, the DB must
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    14
  have a Python DBAPI-2.0 interface.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    15
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    16
- Python (http://www.python.org).  I used a python installation 2.1
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    17
  with some basic modules:
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    18
  - htmltmpl (http://htmltmpl.sourceforge.net/).  A simple HTML
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    19
    template system.  I always think I should upgrade to a more
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    20
    powerful one but htmltmpl really simply do the job.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    21
  - pygresql (http://www.pygresql.org/).  A Python DBAPI-2.0
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    22
    interface to postgresql.  I think any other DBAPI-2.0 compliant
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    23
    module will do it with only small modifications.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    24
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    25
--
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    26
xbelweb installation
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    27
(after untar/unzip the distribution file to a temporary location...)
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    28
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    29
1. Move the python code into a repertory where the web server will serve
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    30
   the CGI.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    31
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    32
2. Tell the web server to serve only CGI .py from the root directory
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    33
   of the application.  The lib and inc directory content should not
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    34
   be used.  Add any authorization you need.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    35
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    36
3. Create a database for xbelweb (e.g., "xbelweb"), then create the
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    37
   tables in the database used by xbelweb using the
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    38
   ./lib/db/create_db.[your database] definition.  I do it with
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    39
   psql -U php < create_db.postgresql
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    40
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    41
4. Update the lib/config.py file to reflect your db configuration.
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    42
8c201fa3bdc7 [svn r1554] Installation instruction.
fabien
parents:
diff changeset
    43