User Tools

Site Tools


podoc:installation

This is an old revision of the document!


Installation Overview

Please note that these instructions only apply to v2.32 or newer. If you are trying to install v2.31b or 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.

  1. Create the database user and database (new install only)
  2. Create the image repository (new install only)
  3. Modify default configuration (new install or upgrade from v2.31b or older)
  4. Install the php files on the web server
  5. Run the web installer tool to set up database tables and complete installation

If you have not already done so, extract the archive you downloaded.

[root@heatwave ~]$ tar -xjf po-2.32.tar.bz2

Create the Database user and database

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 7.4
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
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

Create Image Repository

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

Modify default configuration

If you are performing a new installation or upgrading from v2.31b or older, you will need to copy /po-2.32/config_site.inc into your new Photo Organizer folder. This file contains your site-specific configuration, including database configuration.

[root@heatwave ~]$ cp -v po-2.32/src/include/config_site.php.dist po-2.32/src/include/config_site.php

Then, edit the newly-installed file with your configuration. For example:

$site_url = "http://www.somewhere.com/po";  // This site's url
$site_title = "My Photo Organizer Site"; // Appears in the titlebar on every page.
$db_host       = "127.0.0.1";
$db_port       = "5432";
$db_name       = "po_db";
$db_user       = "po_user";
$db_password   = "mysecretpassword";
$image_repository_path = "/var/lib/photoorganizer";

Install php files

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

Run web installer tool

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:

  • Check PHP, Apache, and Database configuration to ensure it is correct.
  • Install and/or upgrade the actual Photo Organizer database tables and data.

Installation Complete!

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.

podoc/installation.1164463148.txt.gz · Last modified: 2006/11/25 13:59 by pizza