- Install apache 1.3 or later

see www.apache.org

- Install postgres 7.2.3 or later

See www.postgresql.com for more information


- Install Perl

    - see www.cpan.org
    - create a soft link /usr/local/bin/perl to the perl binary

- Install Perl Modules

see www.cpan.org

The fellowing modules are mandatory :


CGI
Cwd
Data::Dumper
DBI
DBD::Pg
DBD::mysql
DynaLoader
File::Spec
File::stat
File::Temp
Getopt::Long
IO::File
IO::Handle
IO::Scalar
LWP::UserAgent
Mail::Sender
Net::FTP
Net::HTTP
POSIX
Schedule::Cron
SQL::Eval
SQL::Statement
Time::ParseDate

Other modules must be installed depending on the connectors you want use.

- Install cafeterra

    - Create a user which will own the cafeterra programs and apache daemons (says aliphe)
    - Create a Postgres user which will own the cafeterra database (says aliphe)
    - Create a directory which will hold the cafeterra programs $CAF_HOME (says /home/app/acfeterra)
    - download cafeterra tarball
    - deflate the tar ball in the $CAF_HOME directory

- Creating Environments :
    When working with cafeterra you to create at least two environment. A design Environment and
a Production environment.
    Under the Design Environment you will be able to define object and processes. It's impossible to run a flow 
under this Environment.
    When you finish developing a flow you deploy it (export its definitions) to a Production Environment.
    Under a Production Environment you will be able to run the flows. You Cannot create objects under
      this Environment. However, you can modify objects under this Environment, but you are    encouraged
      to avoid this. Make All changes you need in the Design and re-export changes to the Production Environment
    You are encouraged to create a third Environment to test your Flows. And fellow this process :
        Design -> Test.
        Design (Corrections) -> Test.
        Design (Stable)         -> Production.

    Many environments can share the same Cafeterra programs. Each environment have its own 
      Pg database and its own working directory.


    Notice : Sometime, in cafeterra an environment is called CONTEXT or QUEUE (the latest for Production Environment).
    Notice : Absolutely Avoid to create multiple Design Environment.

    Notice : How to create an Environment :
       - move to $CAF_HOME/install/Pg
       - run the perl script install using the syntaxe :
          /usr/local/bin/perl install.pm --help --queue --dsn=s --createdb --dbname=s --dbuser=s --dbpw=s
              --createobjects --context=s --generate --silent --basedir=s --httpd=s --cgialias=s --docalias=s
              --installpm

        Where :
            --help                  display this screen
            --queue                 init a cafeterra queue environment (Only when creating A Production Environment)
            --dsn=s                 DBI DSN for the repository or queue database
                                    (default is "dbi::Pg:host=localhost;dbname=$dbname;port=5432")
            --createdb              Create database (local database only)
            --dbname=name           Database name (default is cafeterra if you are creating a repository or
                                    cafeterraq for queue database)
            --dbuser=user           Database user name (default aliphe)
            --dbpw=password         Database user password (default is aliphe)
            --createobjects         Create cafeterra objects and insert initial data
            --context=s             For queue environment only the context name (4 character only)
                                    (Only when creating A Production Environment)
            --silent                Do not ask question
            --basedir=/path/to/caf  Full path to the cafeterra installation directory default is 
                                    calculated from the path of this script
            --httpd=/.../httpd.conf Full path to httpd.conf file 
                                    (or commonhttpd.conf depending on your apache installation)
            --cgialias=s            Cgi Alias to cgi dir
            --docalias=s            Dir alias to to $CAF_HOME/site directory (for images and scripts)
            --installpm             Install common Perl Modules (Doesn't work correctly)


- Sample for Creating a Design environment :
      /usr/local/bin/perl install.pm --dsn=dbi:Pg:cafeterra --createdb --dbname=cafeterra --dbuser=aliphe 
          --dbpw=aliphe --createobjects --silent --basedir=/home/app/cafeterra --cgialias=cafdesign
          --docalias=cafsite --httpd=/etc/httpd/conf/commonhttod.conf


- Create a Production Environment :
       /usr/local/bin/perl install.pm -queue -context=prod --dsn=dbi:Pg:cafeterra --createdb --dbname=cafprod 
          --dbuser=aliphe --dbpw=aliphe --createobjects --silent --basedir=/home/app/cafeterra 
          --cgialias=cafprod --docalias=cafsite --httpd=/etc/httpd/conf/commonhttod.conf


- Run the design environnement 

    - Open a navigator 
    - Connect to the http server using this URL : http:://your.server/cafdesign/index.pl
    - when you connect the first time use the user aliphe with the password aliphe

    - change the aliphe's password
    - create other developer
    - In the Context menu create the definition of the Production Environment.

    - create your objects and Flow definition
    
    - Deploy you flow to the Production or Test Environment

- Run the design environnement 

    - Open a navigator 
    - Connect to the http server using this URL : http:://your.server/cafprod/index.pl
    - Create Scheduling
    - Run the flow monitor
    - Schedule your flows ...

ENJOY 
                                                                           AZIZ
