Copyright (C) 2006 Artica Soluciones Tecnolgicas S.L
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.  A copy of the license is included in the section entitled "GNU
Free Documentation License".


Installation
============

Requires a Web Server (Apache recommended) with PHP 4.3.x (or higher but PHP 5 Not tested yet), 
PHP4-MySQL and PHP4-session modules, PHP-GD v1.3 library 
and JpGraph (http://www.aditus.nu/jpgraph/) for graphic generation.

You need a database with name "babel". 

To create the structure of babel database in MySQL Server you have the SQL script "babel_dbstruct.sql".
It creates tables and indexes needed to insert information into babel database.

You MUST populate database with SQL script "babel_dbdata.sql",
it inserts data needed to run Web Console and default user (login: admin, pass: babel)
to access babel Web Console.

To install the files, first create a database called "babel", 
and set an user to be able to access this database:

mysql> create database babel;

Later, execute the next commands using a user with enough privileges to create tables and indexes
into babel Database into your MySQL Server:

cat babel_dbstruct.sql | mysql -D babel -u root -p
cat babel_dbdata.sql | mysql -D babel -u root -p

Note: if your system is Windows, use the command type instead of cat.

You can also use the source command, if you are connected to MySQL, from the MySQL prompt:

mysql> use babel;
mysql> source <path_to_babel_dbstruct.sql>
mysql> source <path_to_babel_dbdata.sql>

This example is valid using root user in MySQL.
Remember if you're in Windows and you use MySQL v4.1, use the dobule slash ("//") with the path to the files,
not the backslash ("\").

If you have any problem with this commands, from the OS command line you can run this commands:

cat babel_dbstruct.sql | mysql -D babel -u root -p
cat babel_dbdata.sql | mysql -D babel -u root -p

Note: if you're using Windows, you must use type command instead of the cat one.

Now we will create an user "babel" and will be given to it privileges from the localhost:

mysql> grant all on babel.* to 'babel'@'localhost' identified by 'babel';

Keep in mind that users need access from babel WEB Console and from babel Server,
if your deployment has many subcomponents in different physical machines,
you need to setup a MySQL user with privileges to access from different locations.

If you get the error "Warning: mysql_connect() [function.mysql-connect]: client does not support authentication protocol requested by server; consider upgrading"
when authenticating Web Console, you have to change the way the password is stored into the database (see FAQ):

mysql> set password for 'babel'@'localhost' = old_password('babel');

Please note this user will be used by several babel subcomponents(babel Server, babel Web Console) to access database.

Configuration:

The only file you need to modify is include/config.php, where the following variables are included in .php code:
$dbname="babel";   // name of database for babel (default: babel)
$dbuser="babel";   // mysql user to access babel database
$dbpassword="babel";   // Password for mysql user to access babel database
$dbhost="babel";   // Hostname or IP where mySQL server runs

If database is defined and was correctly installed, you can now access:
http://<hostname_babel_webconsole>:<port>/<installation_directory>/index.php

The first time you log there is a default admin user "admin" and password "babel".
It's worth to say that you MUST CHANGE CREDENTIALS BEFORE LOGIN FIRST TIME,
change it or create another account, disabling this one. 