Menu

Installation

Peter Olszowka

Comments:

  • This document is still pretty rough.
  • You really want to read this whole file before doing anything.
  • If you want to help revise this document, speak up!

0 - Prep work

You need a server with:

  • apache
  • php
  • needs to have xsl and multibyte libraries installed and enabled
    (often, but not always, included by default)
  • mysql
  • an instance of smtp which will relay from Zambia/php
    (optional; needed only if you want to send email from Zambia)
    Please test them and make sure they work.

You need to decide on:

  • database name (zambiademo is used here in)
  • database user name (zambiademo is used here in)
  • database user password (4fandom is used here in)
  • web install location (/home/petero/public_html/zambiademo is used here in)

1 - Create a database and a user

You need to have root access to the mysql instance to do this.
If you don't please ask the person who does to do these 4 steps.

mysql -u root -p

mysql> create database zambiademo;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on zambiademo.* to 'zambiademo'@'localhost' identified by '4fandom'; 
Query OK, 0 rows affected (0.07 sec)

mysql> grant lock tables on zambiademo.* to 'zambiademo'@'localhost' ;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.31 sec)

You may want to create multiple MySQL users with each having only the necessary privileges, e.g.

  • administrator — Everything as shown above
  • php user — SELECT, INSERT, UPDATE, DELETE, and LOCK TABLES
  • backup user — SELECT and LOCK TABLES

2 - Setting up the database

You'll need the account and the database created in step 1.

mysql -u zambiademo -p

mysql> use zambiademo
Database changed

mysql> \. EmptyDbase.dump
Query OK ...   (snipped for sanity)

Now you have an empty database that is ready for use with Zambia. You may instead use DemoDbase.dump or SampleDbase.dump.

  • EmptyDbase.dump — only tables required for Zambia to run at all or with hard coded values are populated.
  • SampleDbase.dump — contains data from EmptyDbase.dump plus the report configuration and some configuration data you will need to edit. Also contains users “1” and “2” with password “demo”.
  • DemoDbase.dump — contains data from EmptyDbase.dump, SampleDbase.dump, and some participant preference and schedule data.

3 - Setting up the webpages

Checking out the html and php code.

cd /home/petero/public_html
svn checkout svn://svn.code.sf.net/p/zambia/code/trunk/webpages zambiademo

You probably want to talk with us first and find out what revision is currently recommended.

4 - Tweak the configuration to use your database and specify other preferences

You want to copy db_name_sample.php to ../db_name.php and edit it as needed. In other words, db_name.php should be in the parent directory of Zambia, a directory which is not served by apache. The file db_functions.php loads this file, so you may edit the location if necessary.

5 - Check it all out

http://zambia.dreamhosters.com/~petero/zambiademo

or whatever your URL is...

6 - Ah, an account in zambia so you can log in. That would be useful. Currently we are set up to take a feed from our registration system (namely Congo). There is a script to run on the Congo server to extract the needed information so it can be loaded. This script is named export_program_participants_congo.sql It generates sql that can be in turn loaded into zambia.

However, that can be completely avoided by using add_zambia_user in the scripts directory. It comes with a sample way to add 2 accounts.

If you use a different system for registration, a way to export your users out of it and add them into Zambia in an automated way should be feasible.

7 - Backups are a good thing

If you are changing php and html files, you'll need to talk to us about
access to svn check your changes into svn.

If you care about dbase content, see backup_mysql and clean_backups in the
scripts directory. You'll want to run them or something similar.

8 - Reaching us

I can be reached at zambia-support@arisia.org

Have Fun! -- PeterO


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.