===============================================================================
UMAC CMS INSTALLATION INSTRUCTIONS
===============================================================================
2009-09-25, martin.stricker@gmail.com

The UMAC CMS is a self-contained PHP application based on the Zend Framework 
using MySQL as the database backend. Additionally there are two separate 
applications contained within the CMS - a blog system (Newsblog/Textpattern)
and a wiki (UMAC Wiki/MediWiki) which installation is optional.

The installation process consists of

A. installing the application into a directory
B. configuring the web server and the PHP module
C. installing the CMS MySQL database
D. adjusting CMS configuration (database, directory permissions)
E. (optional) installing and configuring the blog
F. (optional) installing and configuring the wiki


System Requirements
===================
- a Unix-like server operating system (Linux, BSD, Mac OS X, ...)
- Apache HTTP Server 2.2 or later, with mod_rewrite
  http://www.apache.org/
- PHP 5.2 or later as Apache module, with extensions mbstring, mysqli
  http://www.php.net/
- Zend Framework 1.9 or later (the framework itself plus Extras ZendX)
  installed and in include_path
  http://framework.zend.com/
- MySQL 5.0 or later
  http://www.mysql.com/
- super user access to server and database server


Files and Database Dumps
========================
These files and archives are necessary for installation :
{app.pack} = umac.tgz       (Archived application)
{app.sql}  = umcc.sql       (MySQL database dump UMAC CMS)
{txp.sql}  = umctxp.sql     (MySQL database dump Textpattern (Newsblog), 
                             optional)
{wiki.sql} = unimuscoll.sql (MySQL database dump MediaWiki (UMAC Wiki), 
                             optional)
  

Variables
=========
{appdir}
  UMAC CMS application installation directory
{appdb}
  UMAC CMS MySQL database
{apphost}
  UMAC CMS Home URL
{apacheuser}
  Unix user the Apache web server is running under
{txpdb}
  Textpattern (Newsblog) MySQL database
{wikidb}
  MediaWiki (UMAC Wiki) MySQL database

Usernames & Passwords
=====================
{umacadmin} = umcadm
  UMAC CMS site administrator
{umacadminpw} = tri#xie
  UMAC CMS site administrator password

{txpadmin} = umcadmin
  Newsblog (Textpattern) administrator
{txpadminpw} = drp21.
  Newsblog (Textpattern) administrator password

{wikiadmin} =
  UMAC MediaWiki administrator
{wikiadminpw} =
  UMAC MediaWiki administrator password
  

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


A. Install the Application Into a Directory
===========================================
1. Create a new and empty directory {appdir} for the application
2. Unpack the archived application {app.pack} into the
   directory

Example: [shell]: mkdir {appdir}
                  cd {appdir}
                  tar xvzf /path/to/umac.tgz
                  

B. Configure Apache Web Server and PHP module
=============================================
1. Create if necessary a Virtual Host
2. Set for the host these configuration options:
      DocumentRoot = "Absolute Path to {appdir}/public"
      AllowEncodedSlashes On
   Note: The application is configured to automatically detect that it is 
         running from a subdirectory. In that case, point a symbolic link
         to {appdir}/public

3. Make sure the Zend Framework (Zend) and Zend Framework Extras (ZendX) are
   installed and in include_path of the PHP module configuration


C. Install the CMS MySQL Database
=================================
1. Create a new and empty database {appdb}
2. Import {app.sql} into the database
   Example: [shell]: mysql {appdb} < {app.sql}
3. If necessary, create a dedicated MySQL user for {appdb} with reading and
   writing privileges for all tables of {appdb}
   

D. Adjust CMS Configuration
===========================
1. Adjust database host, name, user and password for {appdb}
   Configuration file:
      {appdir}/application/configs/application.ini
   Configuration options:
      resources.db.params.host = "[MySQL host of {appdb}]"
      resources.db.params.username = "[MySQL user of {appdb}]"
      resources.db.params.password = "[password for MySQL user of {appdb}]"
      resources.db.params.dbname = "{appdb}"

2. Adjust Unix write and ownership permissions for these directories so that
   they and their contents are writable for the web server:
      {appdir}/public/pdf
      {appdir}/public/img
   Example: [shell]: chown -R {apacheuser} {appdir}/public/pdf
            [shell]: chmod -R 775 {appdir}/public/pdf
            [shell]: chown -R {apacheuser} {appdir}/public/img
            [shell]: chmod -R 775 {appdir}/public/img

The CMS should be now up and running. You may login using {umacadmin} and
{umacadminpw}. You may want additionally adjust the variables in the "Variables"
section of the migration instructions in {appdir}/PACKANDGO to reflect the
current installation.


E. (Optional) Install and Configure the Newsblog
================================================
At this date, the UMAC website has a blog system integrated, which is an own
application itself, located at {appdir}/public/news and linked through the menu 
item "Newsblog". The blog system is a Textpattern installation, see also:
http://textpattern.com/

1. Import the Textpattern database into MySQL:
   - create a new and empty database {txpdb}
   - Import {txp.sql} into the database
     Example: [shell]: mysql {txpdb} < {txp.sql}

2. Adjust configuration information in the Textpattern config file
   {appdir}/public/news/textpattern/config.php
   
3. Ensure that the web server has writing permission for these directories and
   their contents:
   - {appdir}/public/news/textpattern/files
   - {appdir}/public/news/textpattern/images
   
4. Log into the system at {apphost}/news/textpattern with {txpadmin} and pass-
   word {txpadminpw}
   - Check for error messages at Admin > Diagnostics
   - Update preferences at Admin > Preferences, in particular the Site Url


F. (Optional) Install and Configure the UMAC Wiki
=================================================
At this date, there is an internal Wiki at {appdir}/public/wiki and web 
reachable at {apphost}/wiki. It is a MediaWiki installation, see also: 
http://www.mediawiki.org

1. Import the MediaWiki database into MySQL:
   - create a new and empty database {wikidb}
   - Import {wiki.sql} into the database
     Example: [shell]: mysql {wikidb} < {wiki.sql}

2. Adjust configuration information in the MediaWiki config file
   {appdir}/public/wiki/LocalSettings.php
   
3. Ensure that the web server has writing permission for these directories and
   recursively their contents:
   - {appdir}/public/wiki/images

4. The {appdir}/public/wiki directory may contain a .htaccess file which 
   may contain server based authentication configuration to restrict access
   on the HTTP protocol level. You may want to review and adjust or remove this 
   configuration
