| author | fabien@tzone.org | 
| Tue, 30 Dec 2008 23:16:05 -0500 | |
| changeset 66 | a0aa025ee6a2 | 
| parent 65 | b975a3d7606a | 
| child 67 | 652ff41518f3 | 
| permissions | -rw-r--r-- | 
| 20 | 1  | 
These instructions assume that you have the following working  | 
2  | 
together: Web Server, database and Python. I personnaly used  | 
|
3  | 
this configuration for my testing.  | 
|
4  | 
||
5  | 
- Apache Web Server (http://www.apache.org/). Currently, the  | 
|
6  | 
only to restrict access to your code, is to used the web server  | 
|
7  | 
authentification. With apache, I used the AuthType Basic and  | 
|
8  | 
Limit/require instruction for doing so.  | 
|
9  | 
||
10  | 
- PostgreSQL (http://www.postgresql.org). I try to make my code  | 
|
11  | 
SQL-92 compliant but currently, only test it on PostgreSQL. The  | 
|
12  | 
code can show strange behavior and be corrupt especially if your  | 
|
13  | 
server doesn't support transaction on UPDATE. Also, the DB must  | 
|
14  | 
have a Python DBAPI-2.0 interface.  | 
|
15  | 
||
16  | 
- Python (http://www.python.org). I used a python installation 2.1  | 
|
17  | 
with some basic modules:  | 
|
18  | 
- htmltmpl (http://htmltmpl.sourceforge.net/). A simple HTML  | 
|
19  | 
template system. I always think I should upgrade to a more  | 
|
20  | 
powerful one but htmltmpl really simply do the job.  | 
|
21  | 
- pygresql (http://www.pygresql.org/). A Python DBAPI-2.0  | 
|
22  | 
interface to postgresql. I think any other DBAPI-2.0 compliant  | 
|
23  | 
module will do it with only small modifications.  | 
|
| 28 | 24  | 
- xbel-utils. A part of python-xml to manipulate XBEL XML files.  | 
25  | 
Only necessary if you want the XBEL files import feature.  | 
|
| 20 | 26  | 
|
27  | 
--  | 
|
28  | 
xbelweb installation  | 
|
29  | 
(after untar/unzip the distribution file to a temporary location...)  | 
|
30  | 
||
31  | 
1. Move the python code into a repertory where the web server will serve  | 
|
32  | 
the CGI.  | 
|
33  | 
||
34  | 
2. Tell the web server to serve only CGI .py from the root directory  | 
|
| 
65
 
b975a3d7606a
Partial submission, to include tests.
 
Fabien Ninoles <fabien@tzone.org> 
parents: 
28 
diff
changeset
 | 
35  | 
of the application. The lib and templates directory content should not  | 
| 20 | 36  | 
be used. Add any authorization you need.  | 
37  | 
||
38  | 
3. Create a database for xbelweb (e.g., "xbelweb"), then create the  | 
|
39  | 
tables in the database used by xbelweb using the  | 
|
40  | 
./lib/db/create_db.[your database] definition. I do it with  | 
|
41  | 
psql -U php < create_db.postgresql  | 
|
42  | 
||
43  | 
4. Update the lib/config.py file to reflect your db configuration.  | 
|
44  | 
||
45  |