Here is a small script to automate installation of Photo Organizer.
{{Note|It is not complete yet ....}}
{{File|filename=install_po.sh|content=
#!/bin/sh
#
# Install Photo Organizer
#
# First install all dependecies.
#
apt-get install apache2 postgresql-8.1 php5 imagemagick graphicsmagick php-pear libwmf-bin dcraw exif gs-common
mkdir -p /srv/www/po/html
mkdir -p /srv/www/po/logs
mkdir -p /srv/www/po/photos
chown www-data:www-data /srv/www/po/photos
# Get and unpack po
wget -O /tmp/po-2.33d.tar.bz2 "http://po.shaftnet.org/_media/po-2.33d.tar.bz2?id=start&cache=cache"
tar -C /srv/www/po/html --transform="s@po-2.33d/src@@" \
-xvjf /tmp/po-2.33d.tar.bz2 po-2.33d/src
# Create Postgresql database
su - postgres -c "createuser -S -R -P -D po_user"
su - postgres -c "createdb -O po_user po_db --encoding utf8"
su - postgres -c "createlang plpgsql po_db"
# TODO: Read in hostname, db name and db user/password,
# Site Title, site url
# TODO: Sed po-2.32/src/include/config_site.php.dist so
# it contains :
##################################################
# $install_enabled=1; // Set to '0' when install is completed!
# $site_url = "http://www.somewhere.com/po"; // This site's url
# $site_title = "My Photo Organizer Site"; // Appears in the titlebar on every page.
# $image_repository_path = "/var/lib/photoorganizer";
# // For a local database:
# $db_dsn = "dbname=po_db user=po_user password=mysecretpassword";
# // To use a non-local database:
# //$db_dsn = "host=128.61.15.251 port=5432 dbname=po_db user=po_user password=mysecretpassword";
# // Further examples can be found in src/include/config.php
##################################################
#
# TODO: Create /etc/apache2/sites-available/po and symlink
# to /etc/apache2/sites-enabled/
# TODO: Restart apache
# TODO: Tell the user to run the webinstaller
#
# TODO: Sed back config_site.php so
# $install_enabled=0;
}}