Installing Achievo
==================

Read this first
---------------
Depite our efforts to keep this INSTALL file as accurate as possible, there
might be situations in which the described procedure does not work.
In this case send an email to ivo@achievo.org or to the mailinglist
(achievo@achievo.org) and we will try to help you out.

Upgrading from an earlier version
---------------------------------
This INSTALL file assumes that you install Achievo for the first time.
If you are upgrading from an earlier version, first check the UPGRADE
file for upgrade instructions.

Requirements
------------

- A webserver capable of running php4 scripts
  (Apache is a good choice, http://www.apache.org)
- PHP4 (http://www.php.net) 
- MySQL (http://www.mysql.org) 

Note: Achievo currently requires that PHP is compiled as a module, it does
not work when PHP is compiled as a CGI binary. We will fix this in the future.

Installation Procedure
----------------------

Note that this guide does not describe how to install a webserver or PHP
or a database server. See the documentation for these programs on how to 
install those. This installation guide assumes that you already
have a working webserver with PHP support and a MySQL database installed.

1) Untar the entire achievo archive to a place where you can access it with 
   your webserver.

   example:

   $ cd /usr/local/apache/htdocs              # change to a web accessible directory
   $ tar xzvf ~user/achievo_x.x.tar.gz        # unpack the tar.gz file

   optional:

   $ ln -s achievo_x.x achievo                # make a symbolic link 

2a) Create an empty database in mysql and a user that has select, insert,
    update and delete-access on the database.

    example (assuming your mysql root password is 'secret'):
   
    $ mysql -u root --password=secret mysql

    mysql> create database achievo_0_8;
    mysql> grant select,insert,update,delete on achievo_0_8.* to achievo@localhost identified by 'secret';
    mysql> quit;

    This creates a database named 'achievo_0_8', and a user with username 
    'achievo' and password 'secret'.
     

2b) Use the db/achievo_mysql.sql script to create the tables. 

    example:

    $ cd achievo/db
    $ mysql -u root --password=secret achievo_0_8 < achievo_mysql.sql

    (You can also use the just created user 'achievo', but then you must 
    also grant the 'create' privilige in step 2)

    If you want to install some Achievo demo content, insert
    the 'demo_mysql.sql' file as well (in the same way).


3) Edit the file config.inc.php in the achievo directory, and set the
   $config_databasehost, $config_databasename, $config_databaseuser and
   $config_databasepassword, $config_database variables to match your setup.

   example:

    $config_databasehost     = "localhost";
    $config_databasename     = "achievo_0_8";
    $config_databaseuser     = "achievo";
    $config_databasepassword = "secret";
    $config_database         = "mysql";

5) In the same configuration file there is a variable 
   $config_administratorpassword. This is the password you need on your 
   first login. You might want to change this password.
   
   There are some other things in the config-file that you can change, but 
   for your first configuration, you can leave those settings to the default.      

6) Now you're ready to run Achievo. Just point your favorite browser to the
   directory where you installed Achievo. Login as 'administrator' with the
   password you set in the configfile ('demo' if you left it to the default)

