How to install Achievo on FreeBSD

This article was written for Achievo 1.4.5 and FreeBSD 8.2

Pre-Requisites

 * Basic FreeBSD server with configured PHP web application stack. See How to build a FreeBSD server, the following references may also be useful:
 * The FreeBSD Handbook by the FreeBSD Project ("The Handbook"),
 * Bulding a Server with FreeBSD 7 by Bryan Hong ("Hong"),
 * Absolute FreeBSD by Michael Lucas ("Lucas"),
 * php5-gd module
 * zip and unzip binaries (required by OpenOffice document generator)
 * achievo-1.4.5 (download from http://www.achievo.org/download/)

Install Procedure

 * Login to the Maestro Server as user maestro
 * Download Achievo 1.4.5 from http://www.achievo.org/ and extract to /usr/home/maestro/www/achievo-1.4.5/
 * (optional) Download additional modules from http://www.achievo.org/ and extract to /usr/home/maestro/www/achievo-1.4.5-modules/modulename/
 * moduleinfo
 * weektimereg
 * rssnews


 * Review Achievo INSTALL document (/usr/home/maestro/www/achievo-1.4.5/doc/INSTALL)


 * Create Achievo Apache conf file: /usr/local/etc/apache22/Includes/achievo.conf

Alias /scc-achievo /usr/home/maestro/www/achievo-1.4.5/ AcceptPathInfo On  AllowOverride None Order Allow,Deny Allow from all 


 * Create the Achievo config.inc.php config file

> login maestro > cd ~/www/achievo/ > cp config.inc.php.sample config.inc.php


 * Edit config.inc.php as follows:

$config_db["default"]["host"] = "localhost"; $config_db["default"]["db"]  = "scc-achievo"; $config_db["default"]["user"] = "scc-achievo"; $config_db["default"]["password"] = "SccAchievoPassword"; $config_administratorpassword = "SccAchievoPassword";


 * Edit config.inc.php for modified behavior and load additional modules

$config_timereg_remark_lines = 2; $config_timereg_allowfuture = true;


 * (optional) Edit config.inc.php to load and configure additional modules

module("moduleinfo","../achievo_modules/moduleinfo_2008-11-11/"); module("weektimereg","../achievo_modules/weektimereg_2008-11-11/"); $config_weektimereg_hide_remarkrequired = true; module("rss_news","../achievo_modules/rss-news/");


 * su to root, set permissions on Achievo temp directory so it is writable by the Apache server (www user) and restart Apache to read the new Achievo config file

> su -
 * 1) cd /usr/home/maestro/www/achievo-1.4.5/
 * 2) chown -R www:www achievotmp/
 * 3) /usr/local/etc/rc.d/apache22 reload


 * Create an empty MySQL database and a user with create, alter, select, insert, update and delete-access privileges on the database.

> mysql -u root -p mysql> create database scc-achievo; mysql> grant create,alter,select,insert,update,delete,lock tables, create view, drop, index on scc-achievo.* to achievo@localhost identified by 'secret'; mysql> quit;


 * Login to Achievo for initial configuration
 * Browse to the Achievo URL (e.g., http://www.dalescott.net/scc-achievo/)
 * Login with username admin and administration password.
 * Follow the directions
 * Change the default admin password

Updating
TODO: ACHIEVO UPDATE PROCEDURE TO BE COMPLETED


 * Review Achievo UPDATE document (/usr/home/maestro/www/achievo-1.4.5/doc/UPDATE)
 * Verify the Achievo MySQL database user has the required privileges on the database (select, insert, update, delete, lock tables, create, alter and create vie). These are the same privileges listed in the Install section above, although Achievo does not require create and alter table for normal operation.


 * 1) Download new version to convenient location (e.g. use Lynx to download gzip tarball from http://www.achievo.org/download/files)
 * 2) Extract new version to /usr/home/maestro/www (e.g. # tar -xzvf achievo-1.4.3.tar.gz)
 * 3) Backup MySQL database (e.g., # mysqldump -u root -p --databases achievo > /backup/achievo-2010-04-17.sql)
 * 4) Edit config file in new version and make necessary changes as per previous version config file (e.g., # vi config.inc.php)
 * 5) Edit Achievo Apache config file so Apache serves new version (e.g. # vi /usr/local/etc/apache22/Includes/achievo.conf)
 * 6) Re-start Apache (e.g., # /usr/local/etc/rc.d/apache22 restart)
 * 7) From a client computer, browse to setup.php to perform any needed upgrade (e.g. browse to http://www.dalescott.net/scc-achievo/setup.php).

Additional Notes

 * verify that the php5-gd module is installed
 * verify that the zip and unzip binaries are installed (required by OpenOffice document generator)
 * download achievo-1.4.5 from http://www.achievo.org/download/

Install Procedure

 * 1) cd /usr/local/www
 * 2) tar -xzf /usr/home/maestro/distrib/achievo-1.4.5.tar.gz


 * review /usr/local/www/achievo-1.4.5/doc/INSTALL
 * Make minimum required directories writable by webserver:


 * 1) cd achievo-1.4.5
 * 2) chown -R www:www achievotmp documents doctemplates modules/docmanager/doctypetemplates

or alternatively:


 * 1) chown -R www:www achievo-1.4.5/


 * 1) cd achievo-1.4.5
 * 2) cp config.inc.php config.inc.php.orig


 * use phpMyAdmin to create user achievo and database achievo the user has all permissions on

$config_db["default"]["host"] = "localhost"; $config_db["default"]["db"] = "achievo"; $config_db["default"]["user"] = "achievo"; $config_db["default"]["password"] = "secret"; $config_administratorpassword = "secret"; user "administrator" password for initial login
 * 1) cp config.inc.php config.inc.php.orig
 * 2) vi config.inc.php and edit following lines


 * create /usr/local/etc/apache22/Includes/achievo.conf and restart apache22

Alias /achievo "/usr/local/www/achievo-1.4.5"  Options Indexes FollowSymlinks AllowOverride All Order allow,deny Allow from all 


 * open http://www.domain.dom/achievo/setup.php in a web browser to configure the database