----------------------------------------- SWAM 1.0beta2 INSTALL File ----------------------------------------- 1. Prerequesites Installation ----------------------------- SWAM has been mainly successfully tested under Debian Etch and Lenny with Apache 2 and PHP 5.2. It requires following components: - Web server (Apache is currently the only Web server supported by the installer). - PHP 5.1 or greater. - PDO (PHP Data Objects) extension (interface for accessing databases). - SQLite PHP extension (SQLite is a self-contained, embeddable, zero-configuration SQL database engine). By default, SWAM is configured to use SQLite but another database may be also used (see below). - GD PHP extension. - gettext and English, Brazilian Portuguese or French locales. - modern browser supporting XHTML and CSS (in particular Microsoft Internet Explorer 7 or greater is required). Installation Instructions on Debian ----------------------------------- - apt-get install gettext locales - apt-get install apache2 - apt-get install php5 php5-sqlite php5-gd Installation Instructions on Fedora ----------------------------------- - yum install gettext - yum install httpd - yum install php php-pdo php-gd Installation Instructions on Windows ------------------------------------ - Download and install Apache Web Server (eg Apache 2.2.x) at: http://www.apache.org/ - Download and install PHP (eg using the Windows PHP installer) at: http://www.php.net/downloads.php Make sure to select the right Web Server to setup and to install all needed extensions (PDO, GD2, SQLite, gettext) and the CLI executable. Don't forget to restart your Web server. 2. SWAM Installation -------------------- - Copy www directory into your Web server. Eg: - Linux: cp -r www /var/www/swam - Windows: copy www directory into: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/swam - Make sure that at least "AllowOverride FileInfo Limit Options" is set in Apache configuration for the directory in which you have copied the SWAM files. Then restart Apache. - Linux: edit httpd.conf file or part file (eg: file /etc/apache2/sites-enabled for Debian) - Windows: Program Files->Apache HTTP Server 2.2->Configure Apache Server->Edit the Apache httpd.conf Configuration File - Run SWAM installer at: http://localhost/swam/install.php Additional Notes ---------------- SWAM is using file-based sessions. If you are using a cluster, make sure to store the session files into a directory seen by all servers (by modifying session.save_path properties in php.ini). Also, it is not recommended to work with SQLite databases mounted on NFS partitions. 3. Migration from previous releases ----------------------------------- Migration from SWAM 0.1 ----------------------- A conversion from 0.1 version (MySQL database) into 1.0beta2 version (SQLite database) is provided. To use it: - install SWAM 1.0beta2 (see above). - import SWAM 0.1 data using: ./bin/convert-swam-0.1-mysql-database.sh [-h ] [-P ] -d -u [-p ] -f Migration from SWAM 1.0beta1 ---------------------------- Database schema has changed. A conversion script from 1.0beta1 version into 1.0beta2 version (SQLite database) is provided. To use it: - install SWAM 1.0beta2 (see above). - replace the database file generated by the installer by the 1.0beta1 database file. - run the following command (make sure to make a backup first): ./bin/convert-swam-1.0beta1-sqlite-database.sh -f 4. Miscelleanous ---------------- Alternative to SQLite --------------------- Even if only SQLite is currently supported by SWAM, any database (MySQL, PostgreSQL, ...) providing a PDO (PHP Data Objects) driver may be used. If you want to use another database, you will have to: - write the ad hoc database class by implementing the www/include/database/IDatabase.class.inc interface using the www/include/database/Database.class.inc abstract class, - modify the www/include/constants.inc file accordingly (SWAM_DATABASE_CLASS property), - modify the www/include/config.inc file accordingly (SWAM_DATASOURCE, SWAM_DATASOURCE_LOGIN, SWAM_DATASOURCE_PASSWORD properties).