WebStorage Installation

Installation Instruction for WebStorage Version 1.1

Rafael Ostertag

Table of Contents
1. Preamble
2. Installation Instruction for WebStorage Version 1.1
2.1. Unpacking and Installing
2.2. File Permissions
2.3. Creating or Upgrading the Database
2.4. Config.php
2.5. Creating PostgreSQL Users

1. Preamble

WebStorage Copyright© 2005, 2007, 2008 by Rafael Ostertag

Parts of it Copyright© 1999-2006 The SquirrelMail Project Team

2. Installation Instruction for WebStorage Version 1.1

This document describes only how to install WebStorage. It does not cover how to install a web server or PostgreSQL. Refer to the respective pages for that purpose.

2.1. Unpacking and Installing

  1. Unpack the webstorage-1.1.tar.bz2 file to a directory where the web server has access to. If you are upgrading from an earlier version make sure you make a copy of config.php before overwriting it.

    If you delete text files, such as README, BUGS, etc. make sure you leave COPYING in place. The license dialog of the user interface depends on it.

    You may safely remove the directory doc/ after unpacking. It is not required for proper operation of WebStorage.

  2. Alternatively, you may use the Makefile that comes along with the package. Unpack webstorage-1.1.tar.bz2 to a directory of your choice. Then, type the following command

    		$ make INSTALLDIR=<installdir>

    in a terminal. Of course, you have to change to the directory you unpacked WebStorage before entering the above command.

    <installdir> has to be replaced with the directory you want to install WebStorage to. It takes care of making a backup copy of config.php if this file already exists in the directory specified.

    Be aware that I only tested the make file on Debian Linux, Sun Solaris 10, and FreeBSD.

2.2. File Permissions

Adjust the permissions on the files according your needs with chown(1) and chmod(1). My recommendation is to set the owner of the files to the same user which is running the web server and give only the owner of the files read access to them. This is especially important in case the Safe Mode of PHP is enabled.

2.3. Creating or Upgrading the Database

See the point 1> when doing a new installation and you do not have an existing WebStorage database to upgrade. See point 2> if you are upgrading from an earlier version of WebStorage.

  1. Run the script schema-1.1.psql in the schema/ directory. It will create the database used by WebStorage and a group which is granted full access to this database.

    Change the variable database and groupname according your needs prior the execution of the script.

    The script can be run with the following command:

    		$ psql -U <username> -h <hostname> -d template1 -f schema-1.1.psql

    The user specified by <username> has to be allowed to create databases and groups. <hostname> is the hostname of your PostgreSQL server.

    After successfully installing the database you may remove the directory schema/. It is not needed for the proper operation of WebStorage.

  2. Upgrading from a previous release of WebStorage is pretty easy. Just install the new version and login. WebStorage will check the version of the database schema and take you to a page for upgrading to the new schema.

    The upgrade script prompts you for the user name of a superuser. After entering the user name and password, it will automatically upgrade the existing database to the new database schema.

    However, I encourage you to make a backup of the database and data before performing the upgrade. Use pg_dump(1) on the database in question for this purpose and make sure it does also dump large objects.

2.4. Config.php

Adjust the config.php file according your needs:

  1. WEBSTORAGENAME is simply a string which is displayed on the pages generated by WebStorage. It can be used to distinguish between different WebStorage installations.

  2. THEMENAME is the name of the Cascading Style Sheet used by WebStorage. There is one shipped with this package. Would you like to have a custom style sheet, put it in the css/ directory in your WebStorage directory and change THEMENAME to your file name.

  3. DB_SERVER is the host name of your PostgreSQL server.

  4. DB_PORT is the port where your PostgreSQL server listens. The default value is OK unless you change the port in the PostgreSQL configuration.

  5. DB_NAME is the name of the PostgreSQL database which will store your files and directories created with WebStorage. It is the same name as used to create the database with the schema-1.1.psql script.

  6. SESSIONNAME is used to enable the PHP session management to distinguish between different WebStorage sessions. If you host several WebStorage installations on a single host, give each installation a different session name and they won't interfere with each other.

Please note that since version 1.0 the options HOSTNAME and WEBSTORAGEDIR have been removed. They are no longer needed by version 1.0 or later.

There is also an addition to the options of earlier version, namely SESSIONNAME which you will want to set when upgrading from earlier versions. Refer to the config.php shipped with the WebStorage Version 1.1 package.

2.5. Creating PostgreSQL Users

Create a Postgres user and add it to the group created by the schema-1.1.psql script. User management is done by PostgreSQL, so each user needing access to WebStorage has to have a valid PostgreSQL account.

You are now ready to log in into your WebStorage.

$Id: install.shtml 5947 2014-02-09 14:41:46Z rafisol $