Please note that these instructions are intended for v2.34. For versions 2.31 and older, please see the originial installation instructions at: http://www.k-i-s.net/article.php?article=10
Additionally, please read the installation_gotchas page before installing, as it contains a short list of common problems and their solutions.
To install or upgrade, the following steps are necessary.
If you have not already done so, extract the archive you downloaded.
[root@heatwave ~]$ tar -xjf po-2.34.tar.bz2
Note: These instructions are written with the syntax of postgreSQL 8.1. Older releases may require different arguments.
You will need access to a postgresql user account that is allowed to create new users and databases. This is typically named postgres. Unfortunately, this is typically the most complex part of the installation, and will require some knowledge of the local database configuration. Please see the Configuring PosgreSQL page for additional help.
We will refer to the database as po_database and the user as po_user from now on. You will need to remember the password you entered.
First, we create the user:
[root@heatwave ~]$ createuser -U postgres -S -R -P -D po_user # use '-A' instead of '-S -R' on PG <= 8.0 Password: [[enter_postgres_s_password]] Enter password for new role: [[enter_password]] Enter it again: [[enter_password_again]] CREATE USER
An alternative means of invocation is possible if you have root access on your database server:
[root@heatwave ~]$ su - postgres -c "createuser -S -R -P -D po_user"
Secondly, we create the database:
[root@heatwave ~]$ createdb -U postgres -O po_user po_db --encoding utf8 Password: [[enter_postgres_s_password]] CREATE DATABASE
Third, we add stored procedure support:
[root@heatwave ~]$ createlang -U postgres plpgsql po_db Password: [[enter_postgres_s_password]] CREATE LANGUAGE
Now that the database is created, you will need to designate a location on your system for Photo Organizer to store photographs. While this can be anywhere on your system, we will use /var/lib/photoorganizer for this example. It needs to be a location that the web user can write to, so you may need root access to change ownership to the web server user, typically apache.
[root@heatwave ~]$ mkdir -p /var/lib/photoorganizer [root@heatwave ~]$ chown apache:apache /var/lib/photoorganizer
If you are performing a new installation or upgrading from v2.31b or older, you will need to copy /po-2.34/config_site.php.dist into your new Photo Organizer folder. This file contains your site-specific configuration, including database configuration.
[root@heatwave ~]$ cp -v po-2.34/src/include/config_site.php.dist po-2.34/src/include/config_site.php
Then, edit the newly-installed file with your configuration. For example:
$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=18.104.22.168 port=5432 dbname=po_db user=po_user password=mysecretpassword"; // Further examples can be found in src/include/config.php
If you are performing an upgrade, ensure that you have $install_enabled=1 set, as the installer will not run without it enabled.
If you have not already done so, extract the archive you downloaded. You need to copy the contents of src/* into a location that your web server can serve. Configuring apache is beyond the scope of this document.
[root@heatwave ~]$ mkdir -p /var/www/html/po [root@heatwave ~]$ cp -vr po-2.32/src/* /var/www/html/po [root@heatwave ~]$ chown apache:apache /var/www/html/po
Finally, fire up your web browser and point it to http://www.somewhere.com/po/install.php to complete the installation. This tool will perform the following:
Once the installer is finished, edit your config_site.php file and set $install_enabled=0; to disable the installer. Leaving it enabled is a potential security risk.
Now that it's installed, you may log into your new Photo Organizer installation. The default username and password are 'admin' and 'admin', respectively. Please change this immediately.
Additionally it is possible to install Photo Organizer using an ebuild on Gentoo.
Installation is done in two steps:
1. Install the package in Gentoo via Portage
2. Install the package into your website using webapp-config.
This allows you to install Photo Organizer and it's dependencies (exiftool, postgresql, etc…) once and then use it in multiple virtual hosts on your system.
These parts take care of dependencies and installing of the PHP files. Creating the database and other steps in the installation process are the same as for any other setup.
Currently, ebuilds for gentoo can be found in the following Gentoo bugzilla entry:
You need to put these in a portage overlay, e.g. /usr/local/portage/www-apps/photoorganizer
For details ons how to create a portage overlay see the Gentoo docs at www.gentoo.org