- Create a UNIX group for Nebulous

# groupadd -g 877 nebulous

This is a silly hack to generate a gid.

$ perl -le 'map { $gid += ord } split //, shift; print $gid' nebulous

- Add the users that you want to be able to access Nebulous to that group

# usermod -G nebulous foouser

- build and install the Nebulous Perl modules (see: README)

- create and initialize the database (see: docs/database_setup.txt)

- Install Apache with mod_perl

- mod_perl-1.29 install
perl Makefile.PL USE_APXS=1 INSTALLDIRS=vendor WITH_APXS=/usr/sbin/apxs EVERYTHING=1 PERL_DEBUG=1

#MP_TRACE = 1 MP_DEBUG = 1 MP_USE_DSO = 1 MP_INST_APACHE2 = 1 MP_APXS = /usr/sbin/apxs2

- add the "nebulous" group to /etc/group
- configure Apache to run as the nebulous group. 

install Apache2 >= 2.0.54 and mod_perl >= 2.0.0

Apache::DBI >= '0.97' is required for connect_on_init() to work under mod_perl
>= 2.0.1

# out of date from here down...

#
# CGI interface
#

ScriptAlias /nebulous /usr/local/apache/perl/imageserver.pl

<Directory "/usr/local/apache/perl">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
</Directory>

PerlModule Apache::PerlRun
<Location /perl>
        SetHandler perl-script
        PerlHandler Apache::PerlRun
        Options ExecCGI
        allow from all
        PerlSendHeader On
</Location>

#
# Nebulous::Apache interface
#

PerlModule Apache::DBI
PerlModule Nebulous::Apache

<Location /nebulous>
        SetHandler perl-script
        PerlHandler Nebulous::Apache
</Location>

- setup the server

As a CGI, will with either Apache 1.3.x or 2.0.x

cp scripts/imagesever.pl /var/www/localhost/cgi-bin
chmod 755 /var/www/localhost/cgi-bin/imageserver.pl
touch /tmp/imageserver.log
chmod 1777 /tmp/imageserver.log

- test the imageserver.pl is working

telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /cgi-bin/imageserver.pl HTTP/1.0

HTTP/1.1 411 Length Required
Date: Tue, 28 Sep 2004 21:15:58 GMT
Server: Apache/2.0.49 (Gentoo/Linux)
Content-Length: 0
Connection: close
Content-Type: text/plain; charset=ISO-8859-1

Connection closed by foreign host.

- if you get an HTTP 5xx code check your apache error_log


mkdir /po01/nebulous
chown root:nebulous /po01/nebulous
chmod 0770 /po01/nebulous

in /etc/mysql/my.cnf
under [mysqld]
increase the number of alloweed connections, e.g.
max_connections = 200

