![]() |
Installing WB |
About | Install | Config | Usage | Copyright | F.A.Q. |
---|
/usr/local/apache/cgi-binThe document root will also be somewhere, depending on the configuration of your server; usual places are:
/var/www/cgi-bin
/var/www/htmland the like.
/opt/htdocs
/var/htdocs
Note: If you're running an apache Web server you can find out the location of the two directories into the configuration file (httpd.conf). You must look for the variables: ScriptAlias and DocumentRoot. |
WB installation is made in a few steps:
> tar xvfz wb.tgzor
> gunzip -c wb.tgz | tar xvf
> mv wb.py /var/www/cgi-bin
> mkdir /var/www/html/BillBoards
The http server must have permission to write to this directory. The easiest way is to define the userid which is running the server as owner of the directory. You must check your particular installation to know which is the actual userid (it is usually "apache", or maybe "cochise"). You may use the ps command as follows:
: ps -ef | grep httpd root 624 1 0 Jul 05 ? 0:09 /usr/local/apache2/bin/httpd cochise 27509 624 0 16:34:03 ? 0:00 /usr/local/apache2/bin/httpd cochise 27421 624 0 16:33:05 ? 0:00 /usr/local/apache2/bin/httpd ..... more lines ...Ignore the "root" line. The other are the actual userid you need.
Note: various Unix(Linux) versions may have sligtly different syntax for the ps command. E.g: ps aux |
Finally, move all other files from the WB package to this directory. E.g.:
> mv * /var/www/html/BillBoards
As a starting point you only need to modify the first five items, as follows:# Start customization section root_http = 'http://www.my.domain/BillBoards' root_dir = '/var/www/html/BillBoards' domain = 'my.domain' # e-mail domain smtphost = 'smtp.my.domain' # smtp host deflanguage = 'english.voc' # The file must be located in 'root_dir' auth_mode = 'unix' # Specify user authorization method debug = 0 # Set to 1 for debug output def_ttl = 600 # Session expiring time dolog = 1 # Set to 0 for no logging
> python wb.py wb.py - L.Fini (lfini@arcetri.astro.it). Version 4.11, October 2005 Usage: wb.py -i directory show billboard info wb.py -m [directory] perform billboard maintenance [only on specified dir] wb.py -s bboard doc show document file structure wb.py -u user passwd add user/password to local password file wb.py -v directory show available languages
Note: You may notice that the program wb.py can also be run as an usual program from a command line. This is useful to perform programmed maintenance on the billboards (see below). |
> /var/www/cgi-bin/wb.pyAnd you should see the same output as above. If it doesn't work, check the exact path of your python interpreter. E.g.:
> which pythonThe same path must be written in the very first line of wb.py, as follows:/usr/bin/python
#!/usr/bin/python
http://www.my.domain/cgi-bin/wb.pyAnd you should see a list of available billboards. Note: You will not actually see any billboard, because you haven't defined one as yet!
It is now time to proceed to configuration in order to define your first billboard.
This is as simple as setting up a "cron" item which is started once per day and launches the wb.py script in maintenance mode. E.g.:
> python /var/www/cgi-bin/wb.py -m /var/www/html/BillBoards/myboardWhere "myboard" is the name of a billboard file you want to be maintained clean. The command will check all documents and orderly remove expired ones.
When in debug mode WB will output much information when running and the standard CGI/python traceback function will be enabled.