=head1 NAME

Contentment::Manual::Install - The installation guide for Contentment

=head1 SYNOPSIS

  perl Build.PL
  ./Build
  ./Build test
  ./Build install

=head1 DESCRIPTION

The procedure given in the L</"SYNOPSIS"> will give you the base install. If you're using CPAN, you can also:

  cpan Contentment

or:

  perl -MCPAN 'install Contentment'

depending on the availability of the F<cpan> script.

After the base is installed, you will need to configure your Contentment installation. As of this writing, this is a non-trivial process, but I'm curently working on a script to automate it.

B<WARNING:> I<I am serious. These instructions are not for the faint of heart! Older individuals, pregnant women, and anyone who might be at risk for heart related problems should stop here.>

=head2 CONFIGURING APACHE

These instructions assume you are using Apache web server (the version matters very little), but any CGI capable web server is sufficient, assuming you can adapt these instructions to those web servers.

The files you need to get started with are in the F<htdocs> folder. You need to copy these files somewhere Apache will find them. You can either copy these files into your web root or you can tweak the F<httpd.conf> of your web server.

Finally, you need something like the following in a file named F<.htaccess> within the directory where you copied F<htdocs>, or the equivalent information inside of your F<httpd.conf>:

  Options FollowSymLinks

  RewriteEngine on
  RewriteRule "^$"    "cgi-bin/contentment.cgi/index.html" [L]
  RewriteRule "(.*)$" "cgi-bin/contentment.cgi/$1"         [L]

and in the F<.htaccess> file for F<htdocs/cgi-bin>:

  RewriteEngine off

  Options ExecCGI
  AddHandler cgi-script .cgi

=head2 CONTENTMENT INIT CONFIGURATION

Before running Contentment, you need to create a file named F<init.yml> in the same directory as F<contentment.cgi>. This file should contain at least three directives in L<YAML> format: "dbi_database", "plugins_dir", and "vfs". Depending on your setup, you'll probably also want "dbi_username" and "dbi_password".

  dbi_database: dbi:mysql:exampledb
  dbi_username: example
  dbi_password: secret

  plugins_dir: /var/www/localhost/plugins

  vfs:
   - Real
   - root
   - /var/www/localhost/htdocs

=head2 READY TO ROLL

Assuming these instructions are at all correct and useful. You should now be able to open your Contentment F<index.html>.

=head1 AUTHOR

Andrew Sterling Hanenkamp, E<lt>hanenkamp@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright 2005 Andrew Sterling Hanenkamp. All Rights Reserved.

Contentment is distributed under the same terms as Perl itself.
