Installation HOWTO
Author: Matthew Maxwell
Date: June 22, 2004

Introduction
  Installation of OpenBasin is realatively easy. The first step in the process is to get the necessary files. There are two methods of doing so--using CVS and downloading the files over HTTP. Using HTTP is the quicker and easier method; however, using CVS allows you to more easily stay current with OpenBasin updates, and you can also become involved in the OpenBasin development processs with CVS.

Downloading Files over HTTP
  To obtain the latest files over HTTP, go to the OpenBasin downloads page:
http://openbasin.org/downloads.php
From that page download the latest stable release of OpenBasin. Then at a shell prompt go to the directory that you want to be the parent directory of your OpenBasin files and type:
$ tar -zxf /source-dir/openbasin.tar.gz
Where source-dir is the directory into which you downloaded the file from the OpenBasin homepage. This command will unpack all of the OpenBasin files and store them in the openbasin sub-directory.

Downloading Files with CVS
  To obtain the OpenBasin files using CVS you first need to login to the OpenBasin.org CVS server:
$ cvs -d :pserver:anonymous@openbasin.org:/cvs/openbasin login
It will respond with the following output and prompt you for a password. Type in 'anonymous' as the password.
Logging in to :pserver:anonymous@openbasin.org:2401/cvs/openbasin
CVS password:
Then change directories until you are in the directory that you wish to be the parent directory for the OpenBasin files. All of the files will be installed into a sub-directory of this directory named openbasin. Now type in the command to checkout, or retreive the files from the OpenBasin.org CVS server:
$ cvs -d :pserver:anonymous@openbasin.org:/cvs/openbasin checkout openbasin
That command will respond with the following output:
cvs server: Updating openbasin
U openbasin/setup.pl
cvs server: Updating openbasin/admin
U openbasin/admin/index.php
cvs server: Updating openbasin/admin/images
U openbasin/admin/images/add_station_icon_bevel.gif
  :
  :
U openbasin/plugins/snotel-hour-grabber.pl
U openbasin/plugins/usgs-grabber.pl
cvs server: Updating openbasin/smarty
U openbasin/smarty/Smarty-2.5.0.tar.gz
cvs server: Updating openbasin/smarty/conf
U openbasin/smarty/conf/AdminSmarty.class.php

Finishing the Installation
  At this point you should change directories into the openbasin directory, and run the setup script by using the following command:
$ cd openbasin
$ ./setup.pl
The setup script creates a ob_config.php file in the openbasin directory and creates symbolic links to this file from other locations within the Openbasin code. The setup script also creates a few directories which are necessary for Openbasin to run properly.

The ob_config.php file needs to be manually edited to reflect settings on the current server before OpenBasin will work. More information conerning this process can be found in the Editing ob_config.php HOWTO.

The last step in this process is to create a symbolic link from the root directory of your website to the ob_config.php file in the openbasin directory as follows:

$ ln -s /path_to_openbasin/ob_config.php /path_to_website/ob_config.php
If you want to be able to access the Openbasin admin pages or interactive documentation from this website you must also create symbolic links to them:
$ ln -s /path_to_openbasin/admin /path_to_website/admin
$ ln -s /path_to_openbasin/documentation /path_to_website/documentation
With this setup the admin pages will be found at http://www.yoursite.com/admin and the documentation will be found at http://www.yoursite.com/documentation where www.yoursite.com should be replaced with the domain name of your website.

Installing the Database
  The intricacies of a PostgreSQL database is beyond the scope of this HOWTO document; however, if the PostgreSQL database is set up properly you will be able to install the OpenBasin database with the following command (from the openbasin directory):
$ psql openbasin <db/openbasin.sql
This is assuming openbasin is the name of the OpenBasin database. According to your database setup, you may also be required to add a username and type in a password to access the PostgreSQL database.

To include the interactive documentation you must also use the following command:

$ psql openbasin <db/documentation.sql

Setting up the Database
  You now have OpenBasin set up and working, but it useless until you set up the database correctly. Setting up the database can be rather daunting at times, but the admin files will help you set it up without too much trouble. The Using the admin pages HOWTO can be found here. Also it may be helpful to read the tutorial on the OpenBasin database structure.

technical contact: Matthew Maxwell
general contact:

Wisp-router.com