XRMS Installation READ_ME

Author: Beth Macknik (maulani)
$Id: INSTALL,v 1.7 2004/09/21 17:48:44 braverock Exp $

INSTALLATION
============

To install XRMS, you need to place the main installation directory in a
location where your web server can access it.  For greater security, you
can move the include directory to another location that is not accessible
by your web server.

You must also have access to a mySQL database for your data.
(Support for other databases are planned in the future, but
mySQL is required for now.)

Create a MySQL database to hold the XRMS tables, and pick a valid MySQL
account for XRMS to use.

Example:
   from a mysql prompt
   create database xrms;
   grant all privileges on xrms.* to xrms@localhost identified by 'yourpasswordhere';

The include_locations.inc file is located at the top level of your
XRMS directory.  This file records where the include folder is located.
You should open this file with a text editor and follow
the instructions in the file.

The vars.php file is located within the include folder.
It contains all of the implementation specific variables such as database
location and password.  Edit this file to set these items.

After setting your vars.php variables, you will need to make certain that the
temporary directory, file storage directory, and export directories are all
writable by the web server.  These are the directories defined by the vars.php
variables: $tmp_upload_directory, $file_storage_directory, $tmp_export_directory

Now, to setup the database schema and basic dataset, point your web browser to:

http://www.yourserver.com/path_to_xrms/install/install.php

The install code will do some basic checks on your include_locations.inc and
vars.php files.  It will then verify that it can communicate with the database.
If everything is good, it will connect to the database and setup the appropriate
schema and basic dataset.

Once you've run the install script, it is recommended that you run the
Administration -> Database Structure Update
Administration -> Data Cleanup
to avoid possible errors when using features.

If no errors are detected, it will then ask if you wish to create some sample data.
This is optional, and you can move directly to using xrms if you wish.

Please note that all of the installation code is non-destructive.
If you mistakenly run this over a live database, your data will not be harmed.



UPDATE/UPGRADE
==============

To update/upgrade XRMS from a previous version:

Here is the process, in a nutshell.

- make a copy of your vars.php and include-locations.inc files so that
you can preserve your settings

- untar the new distribution

- merge your include-locations.inc and vars.php file with the vars.php
file in the new release tarball.  The new release has additional options
that you will need for full functionality.

- log in as an administrative user

- run the 'Database Structure Update' and 'Data Cleanup' scripts from
the 'Administration' menu.

That should be it.  The developers have worked pretty hard to make sure
that upgrades go smoothly, because we are all running current CVS in
production at our current companies.  If we didn't automate this, our
installations would break as well.

This is a non-destructive routine to bring your system up to date.
(If you were up to date (CVS) as of 2004-03-17 or later.) If you are
starting from code older than the March date above, contact the
development team for assistance, as the process is more complicated.

TEMP FILE CLEANUP
=================

XRMS creates temporary files for exports, places imports in a directory, etc.

We recommend that you implement an automated directory
cleaning application like tmpwatch.
Managing temporary files is a facility best left
to routine system administration, not XRMS directly.

Most distributions come with some temp-file cleanup utility.
 (tmpwatch is distributed with Red Hat, Mandrake, and many
others)  Usually, this temporary file cleanup utility runs
on a daily basis, and cleans out old files.

For tmpwatch, you would add the following lines to your
/etc/cron.daily/tmpwatch script under linux
(adjust paths as needed)

/usr/sbin/tmpwatch -f 48 /var/www/html/xrms/export/
/usr/sbin/tmpwatch -f 48 /var/www/html/xrms/upload/

The lines above will delete any files that have not been
accessed in 48 hours from the export and upload directories.
(24 hours would have been a fine number as well)


MISC
====

If you suspect that php is not running corectly on your server,
try pointing your web browser at install/phpinfo.php. It should produce
several pages of information about your php installation.

/**
 * Change Log for INSTALL file
 * $Log: INSTALL,v $
 * Revision 1.7  2004/09/21 17:48:44  braverock
 * - make Database Structure Update and Data Cleanup recommendations explicit on install
 *   credit Walt Pennington for the suggestion
 *
 * Revision 1.6  2004/09/09 12:26:52  braverock
 * - add note about setting write permissions on temp, storage, and export directories
 *
 * Revision 1.5  2004/07/26 04:21:48  braverock
 * - added notes on temporary file cleanup to INSTALL docs.
 *   - adresses SF Feature request 946925
 *
 * Revision 1.4  2004/07/25 19:29:43  braverock
 * - added more explicit instructions on Upgrading
 *
 * Revision 1.3  2004/07/13 14:05:41  cpsource
 * - Produce Useful Info About PHP
 *
 * Revision 1.2  2004/04/28 14:59:06  braverock
 * - updated install doc to include example database creation commands
 *
 * Revision 1.1  2004/03/22 15:30:12  braverock
 * Initial Revision of INSTALL file copied from READ_ME to conform better to established conventions
 *
 */