INSTALLATION INSTRUCTIONS

 

 

Preparation

First, read the Introduction, that contains some important information I don't want to repeat once more.

There are three basic tasks necessary to install Photo Organizer:

  1. Prepare the database.
  2. Install the PO source files.
  3. Create the image repository.
  4. Run the web install tool.

 

New Installations -- Database Preparation

Follow these step by step instructions to install or upgrade the software:
  1. Create a postgresql user and postgresql database. You will need to have access to a postgresql user account that is allowed to create new users. In case you are upgrading skip this step and use the exisiting database and database user. We will refer to the database as po_database and to the database user as po_user in the future.
  2. [balint@apollo ~]$ createuser -A -D -U pg_superuser po_user
    CREATE USER
    [balint@apollo ~]$ createdb -U po_superuser -O po_user po_database
    CREATE DATABASE

  3. As the superuser of your database server, add the plpgsql language to your newly created database.
  4. [balint@apollo ~]$ createlang -U pg_superuser plpgsql po_database

New Installation or Upgrades
  1. Untar the distribution file (eg po.2.32.tar.bz2). Change directory into the directory it creates (eg po 2.32). (If you can read this file you already completed this step) All directories in this document are relative to this one, except when indicated otherwise.

    [balint@apollo ~]$ tar xvzf po.2.32.tar.gz
    [balint@apollo ~]$ cd po.2.32
    [balint@apollo po.2.32]$ ls
    COPYING doc src

  2. In the src directory, you will find the php files. You must copy these over to a place accessible by your web server.

    Copy the whole src subtree into a location of your choice within the HTTP server's document_root directory, or into the location of the old php files. You may need root permissions to do this.

    [balint@apollo po.2.32]$ cd src
    [balint@apollo src]$ cp -R * /var/www/html/po

  3. If this is a new installation (or you are upgrading from PO 2.31a or older) you will need to back up and copy over your site-specific configuration.

    [balint@apollo src]$ cp include/config_site.php.dist /var/www/html/po/include/config_site.php

    Edit the newly-copied /var/www/html/po/include/config_site.php file and ensure that all settings are correct. This file is not overwritten by upgrades, so you should only have to do this once.

  4. Log in as root and change the ownership of the installation (of the php files and directories) to the user which runs the HTTP server. Make sure that the index.php file is not only owned by the user that runs the HTTP server but also has write permissions, so that you can edit your Front Page template online.

    [balint@balint tmp]$ su
    Password:
    [root@apollo src]$ chown -R apache:apache /var/www/html/po
    [root@apollo src]$ chmod +w /var/www/html/po/index.php

 

Create the Photo Organizer Image Repository

  1. Log in as root and create a directory anywere on the server (not located or linked in the HTTP server's document root directory), we will reference this directory as your image repository

    [root@apollo export]$ pwd
    /export
    [root@apollo export]$ mkdir my.repository

  2. Check for the include/config_site.php file in your PO installation directory, and edit the variable $image_repository_path to point to your image repository, than in the Photo Organizer administrator interface, select the current volume.

  3. Change the ownership of the repository recusrively to the user which runs the HTTP server (apache in our case), and make sure that the user can read and write the repository.

    [root@apollo export]$ chown -R apache:apache my.repository
    [root@apollo export]$ chmod -R 750 my.repository

 

Run the web installer

  1. Now that the database is created, visit http://yourserver/path_to_po/install.php. This script will perform any necessary database upgrades and sanity-check the installation. Please follow any instructions it gives.
  2. Once the installer is finished, it will tell you to erase install.php. We highly recommend you do this to help keep your installation secure.

Comments and corrections are welcome at po-devel@shaftnet.org.