FRUSTRATION TOO 0. Prerequisites Apache and mysql. (Tested with apache 2.0 and mysql 3.23. With little creativity will work with any other http server and relational database.) Also, perl and DBI.pm and CGI.pm. Also, ImageMagick, Image::ExifTool, String::LCSS, jhead/jpegtran. 1. Configuring apache Add following to the '' section of httpd.conf and restart httpd: ---------------------------------------------------------------------- RewriteEngine On RewriteRule ^too$ too/ RewriteRule ^too/(.*)$ cgi-bin/too/frust.pl?$1 [L] RewriteRule ^too/admin/?$ cgi-bin/too/frust.pl?admin=1 [L] RewriteRule ^too/album/(.*)/(.*)$ cgi-bin/too/frust.pl?album=$1&what=albums&page=album&$2 [L] RewriteRule ^too/album/(.*)$ cgi-bin/too/frust.pl?album=$1&what=albums&page=album [L] RewriteRule ^too/picture/(.*)/(.*)$ cgi-bin/too/frust.pl?pid=$1&page=picture&$2 [L] RewriteRule ^too/picture/(.*)$ cgi-bin/too/frust.pl?pid=$1&page=picture [L] # Support the restricted mode RewriteRule ^gallery/(.*)/(.*)$ cgi-bin/too/frust.pl?restricted=1&alias=$1&what=albums&$2 [L] RewriteRule ^gallery/(.*)$ cgi-bin/too/frust.pl?restricted=1&alias=$1&what=albums [L] RewriteRule ^too/admin/(.*)$ cgi-bin/too/frust.pl?admin=1&$1 [L] ---------------------------------------------------------------------- 2. Configuring database engine Create your database, for example: ---------------------------------------------------------------------- CREATE DATABASE frustration; GRANT ALL PRIVILEGES ON frustration.* TO 'joe'@'localhost' IDENTIFIED BY 'joes_password'; ---------------------------------------------------------------------- Copy Frust/Config.pm.dist to Frust/Config.pm, and update the following lines in Frust/Config.pm to reflect your settings: ---------------------------------------------------------------------- $ENV{DBI_DSN}='dbi:mysql:database=frustration'; $ENV{DBI_USER}='joe'; $ENV{DBI_PASS}='joes_password'; ---------------------------------------------------------------------- 3. Initializing data Create the database schema: ---------------------------------------------------------------------- mysql -u joe -pjoes_password frustration < schema.sql ---------------------------------------------------------------------- Assuming that you laredy copied Frust/Config.pm.dist to Frust/Config.pm, change paths there as needed. Create the following directories (use different paths if you changed Config.pm): XXXXXXX: update /var/www/frust /var/www/frust/pictures /var/www/frust/pictures/orig /var/www/frust/pictures/medium /var/www/frust/pictures/small /var/www/frust/pictures/tmp They should be readable and writabale by you and by apache. 4. Installing and running Make sure frust.pl is executable and copy it to /var/www/cgi-bin. The script generate-thumbnails.pl should always be run. Add it to your startup scripts, or just run 'nohup ./generate-thumbnails.pl&' 5. To import local directories as albums, run: ./import-dir.pl ..... 6. Point you browser to http://your-host/too, and enjoy! 7. Admin mode setup Create a new Apache password file and a new user: htpasswd -c /var/www/passwords joe Then, add the following section to httpd.conf and restart httpd: ---------------------------------------------------------------------- AuthType Basic AuthName "Frustration Too administration" AuthUserFile /var/www/passwords Require user joe ---------------------------------------------------------------------- To access admin functionality, go to http://your-host/too/admin/ KNOWN PROBLEMS *. Access right to subdirectories -- fixed. (?)