This doc is being rewritten. Here's the new outline:
install pre-requesites
postgresql 8.x apache 1.x mod_perl 1.x
cpan modules
create databases
download act
svn co
configure act
PERL5LIB / ACTHOME
create sample conference
mkdir actdocs;
cp -pr skel/
cp -pr skel/actdocs actdocs/sample
configure act
cp -pr eg/conf .
configure act.ini
database
make test
configure apache
vhost stuff
test
http://localhost/sample/
NOTES on compiling Apache 1.3 on Ubuntu
Use : bash ./configure --prefix=/usr/local/httpd --enable-shared=max --enable-module=rewrite --enable-module=expires
Because under Ubuntu, sh is a symlink to dash, which breaks configure.
make && make install
compiling mod_perl
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/httpd/bin/apxs EVERYTHING=1
Install (or svn checkout) Act in a directory. In this document we'll use /home/act, and refer to it as Act's home directory.
The required modules are tested for in t/01cpan.t. You'll find the complete and up-to-date list of prerequisites in that file.
First thing is to enable Perl (and mod_perl) to find the Act modules.
export PERL5LIB=/home/act/lib
Act needs to know its home directory so that it can find its configuration file. This is done by setting the ACTHOME environment variable:
export ACTHOME=/home/act
Make sure both ACTHOME and PERL5LIB are set and exported when running httpd or 'make test': include these settings in both your shell profile (~/.bashrc or equivalent) and Apache startup script (apachectl or equivalent.)
Next, define a virtual host in your Apache configuration file (httpd.conf) for Act. Here's an example:
<VirtualHost *>
ServerName localhost
ServerAdmin webmaster@example.com
DocumentRoot /home/act/wwwdocs
Include /home/act/conf/httpd.conf
</VirtualHost>
For code development it is useful to install the Apache::Reload
module. Enable it in httpd.conf (outside of any VirtualHost
containers):
PerlModule Apache::Reload
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
Then add this inside Act's VirtualHost container:
PerlSetVar ReloadModules "Act::*"
If you don't want to mess with name-based virtual hosts and DNS, an easy setup is to use a port-based virtual host:
Listen 9000
<VirtualHost *:9000>
Port 9000
ServerName localhost
ServerAdmin webmaster@example.com
DocumentRoot /home/act/wwwdocs
Include /home/act/conf/httpd.conf
</VirtualHost>
Create the directory where photos will be uploaded, by default $ACTHOME/wwwdocs/photos. Make sure it is readable by all, and writable by the user running Apache.
In order to use the database with Act, you need to follow the procedure explained below. Act's preferred database is PostgreSQL, so the examples use Pg's syntax.
As the postgres superuser, create a database user for yourself:
$ createuser user
Shall the new role be a superuser? (y/n) y
Still as the postgres superuser, create three databases named act, acttest and actwiki:
$ su - postgres
$ createdb act --encoding=UTF8
$ createdb acttest --encoding=UTF8
$ createdb actwiki --encoding=UTF8
$ ^D
Grant access from localhost to these databases by adding these lines to pg_hba.conf:
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
and restart the PostgreSQL server.
Run the output of bin/dbinit in this directory. This will create the tables in databases act and acttest:
$ bin/dbinit | psql act
$ bin/dbinit | psql acttest
Run wiki-toolkit-setupdb to create the tables in database actwiki. (This utility is installed by Wiki::Toolkit.)
$ wiki-toolkit-setupdb --type postgres --name actwiki --user act --pass xyzzy
Update $ACTHOME/conf/act.ini (or $ACTHOME/conf/local.ini) with the database names and credentials.
[database]
name = act
dsn = dbi:Pg:dbname=$(database_name)
user = user
passwd = xyzzy
test_dsn = dbi:Pg:dbname=acttest
test_user = user
test_passwd = xyzzy
[wiki]
dbname = actwiki
dbuser = user
dbpass = xyzzy
Note that for a developer install, the password is not needed, since the database is configured to trust.
From the package's top level directory, run the test suite to verify that the software is able to connect to the database.
$ make test
Now edit conf/act.ini and enter your conference settings:
[general]
conferences = act-2004
dir_ttc = /tmp/act/ttc
The dir_ttc directory stores the compiled TT templates.
To make sure that your system has all the requirements to run Act, and that Act works correctly on it, you can now run Act's test suite. This test suite requires Test::More.
cd $ACTHOME
make test
Decide the name of your conference. We'll use act-2004 as an example.
$ACTHOME/
actdocs/
act-2004/
conf/ # local configuration
static/ # "static" multilingual .html pages
templates/ # local templates or global overrides
wwwdocs/ # static files
photos/ # user photos (general_dir_photos conf item)
act-2004/
css/
images/