System Installation
Contents
Introduction
This section describes how to:
- Install a new DrawMGT system
- Update/migrate an existing DrawMGT system
Basic Installation Steps
System installation requires the following steps:
- Creating site and instance configuration files
- Creating the application root directory
- CVS checkout of the app, lib, site and instance CVS trees
- Running the script app/install/setup.sh (as root)
- Setting up the system database, either via migration from an older version or loading from a backup
- Running the script app/etc/genMeta.pl
To Be Completed
Updating an Existing System
The following shows how to update an existing DrawMGT system:
- Site linthal
- Instance loki.softxs.ch-dev
- Version V11.5
Overview of Update Steps
- CVS update
- Run setup.sh script as root
- (Re-)load database - optional, only required if there have been a database model change or change to basic reference data
- Run genMeta.pl -b to generate database logging and mirroring SQL scripts used by loadSystem
- Run loadSystem.sh script to load from a previous DrawMGT version
- Load the database from a backup file
- Run genMeta.pl script
- Run setup.sh script as root again
CVS Update
You must update the following CVS trees:
- app - The DrawMGT application
- lib - DrawMGT support libraries
- cfg/{site}/site - The site settings
- cfg/{site}/instance/{instance} - The instance settings
Procedure: As a normal user (e.g. 'dominic')
cd /home/www/html/dev/linthal115dev cd app cvs -q up -d cd ../lib cvs -q up -d cd ../cfg/linthal/site cvs -q up -d cd ../instance/loki.softxs.ch-dev cvs -q up -d
Notes:
- Depending on who/how the original CVS was checked out, may need to edit the file ~/.cvsrc to set/override the CVS user.
Run Install script
As user root:
cd /home/www/html/dev/linthal115dev/app/install ./setup.sh linthal loki.softxs.ch-dev www drawmgt www
Be sure to inspect the script's output and make sure that no errors were reported.
Load Database
Loading the database this step is only required if:
- There has been a database model change since the last CVS update, or..
- There have been changes to the system reference data
Can be run as any user.
Procedure: Migrating from previous version:
cd /home/www/html/dev/linthal115dev/app/etc ./genMeta.pl -b ./loadSystem.sh -v -l dev dev
Notes:
- Be sure to carefully inspect the output of the loadSystem.sh script to make sure that no SQL or other errors occurred.
- You can use the -n (don't run) and -v (verbose) option to see what loadSystem.sh going to do
- Use the -l (latin1) option until the sql scripts are written in ISO8859-1 (latin1) caharacter set
Procedure: Loading from a database backup:
mysql -uroot -psqladmin drop database linthal115dev; create database linthal115dev; use linthal115dev; source {databade-backup-file-name}.sql quit
Run genMeta script
The genMeta.pl script generates a number of static caches and must be run when the system database is reloaded or when new PHP classes, forms and other elements have been added to the system. genMeta.pl runs by sending web requests to special internal URLs that activate PHP scripts in the lib/meta library.
Can be run as any user
Procedure:
cd /home/www/html/dev/linthal115dev/app/etc ./genMeta.pl
Notes:
- genMeta.pl generates a number of errors, which are not errors. This is caused by variable names and database field names that contain the strings 'error' and 'fail'.
The following is typical normal output from genMeta.pl
Generate DB Business Object Classes 'Generate DB Business Object Classes' produced the following 2 errors: <td>failedLogins</td> <td>failedLogins</td> Please check 'http://localhost/dev/linthal115dev/lib/meta/generator/index.php' for further details. Generate Form Templates and Classes Generate Template Map Generate Autoloader Class Generate DB Defines Generate Caches Generate Message Catalogs 'Generate Message Catalogs' produced the following 19 errors: <li>submittalNoErrors <li>submittalXmitNoErrors <li>eventHtmldocError-args <li>eventDeletionError <li>errors <li>errorCount <li>noErrors <li>errorLogList <li>reportListsError-args <li>errorLogMessages <li>totalErrors <li>errorHashkey-args <li>wwSaveError <li>wwRefreshError <li>internalErrorActions <li>cacheLookupError <li>failed <li>validationFailed <li>loginFailed Please check 'http://localhost/dev/linthal115dev/lib/meta/message/index.php' for further details. Check Installation
At this point the DrawMGT application should be ready for use.