Menu

Installation

Mike James Kenneth Tanzer

Use the installation script

There is an [Installation_script] being developed that will automate most or all of the steps involved. If the script does not work for you, use the rest of this page as a checklist to find the problems, and help us improve the script.

Prerequisites

Install necessary software

  • This command will work for Fedora...
  • Can someone provide an equivalent apt-get for Ubuntu?

    yum install \
    postgresql \
    postgresql-devel \
    postgresql-libs \
    postgresql-server \
    postgresql-pltcl \
    postgresql-table_log \
    postgresql-contrib \
    zziplib \
    zziplib-devel \
    php-pear \
    gcc \
    php-pgsql \
    php-devel \
    mod_ssl \
    make \
    pcre-devel

and then

pecl install zip

Auto Start PostgreSQL and Web Server

  • To automatically start PostgreSQL and your web server when starting your computer, type the following in a command line:

    chkconfig --level 345 postgresql on
    chkconfig --level 345 httpd on

You will now need to either reboot, or manually start postgresql and httpd:

/sbin/service postgresql initdb
/sbin/service postgresql start
/sbin/service httpd start

In Fedora 16, the initdb step has changed:

 postgresql-setup initdb

If you get PHP out of memory errors, you may need to increase the memory limit setting in /etc/php.ini:

; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
memory_limit = 128M
  • For testing purposes you might want to temporarily change display_errors in /etc/php.ini to log errors

Securing Your Web Connections

  • If you want to require SSL connections (recommended), add the following lines to your Apache configuration file (/etc/httpd/conf/httpd.conf)

    <Directory /var/www/html/agency>
    SSLRequireSSL
    </Directory>

    This requires SSL and generation of a certificate.
    A better solution is to redirect http requests to https using mod_rewrite.
    I couldn't get that working, though. Can someone post appropriate
    Configuration?

[Category:Install][Category:Fixme]

Configure Postgres to Allow Localhost Access

(There are a lot of ways to configure access. This example will allow password access for the default user (agency) and database (agency))

  • Edit /var/lib/pgsql/data/pg_hba.conf by adding these two lines before any others:

    host agency agency 127.0.0.1/32 md5
    host agency agency  ::1/128 md5

  • Reload the Postgres configuration

    /sbin/service postgresql reload

Configure Error Logging

  • create appropriate error logging directory and touch the file

    mkdir /var/log/agency
    touch /var/log/agency/agency_error.log

Installing AGENCY

Download and unpack the software

  • You will probably want to unpack it to either /var/www/agency (ubuntu), or /var/www/html/agency (fedora).
  • You can place it in the public_html directory in your home directory if you want to run it from there.

You can get AGENCY from Git, which will start you with the most current version:

cd /var/www/html
git clone git://git.code.sf.net/p/agency/code agency-code
(if that command fails because you don't have git, install it with "yum install git")


The rest of these instructions will assume you placed agency in 
/var/www/html/agency (as you would for Fedora, RHEL or CentOS).
If you placed it elsewhere, adjust the paths accordingly.

SELinux Settings

  • If you downloaded and unpacked AGENCY into your home directory, and then moved it to /var/www/html, run the following command:

    restorecon -r /var/www/html/agency

  • This command will allow the webserver to connect to the database:

    setsebool -P httpd_can_network_connect_db=1

Create the database user and database as super user

cd /var/www/html/agency/database/pg/agency_core/pg_super_user
su postgres

psql

/*
 * Paths and URLs
 */

// Base install
$AG_HOME_BY_FILE = '/var/www/html/agency';
$AG_HOME_BY_URL =  '/agency';

Access AGENCY

  • Browse to the appropriate url. Browsing to https://localhost/agency should work, unless you installed it somewhere different.
  • You will see a link to configure the engine array. Click it.
  • Return to the AGENCY page: https://localhost/agency

You can now log in as super_user, with the password you specified earlier in add.initial_user.sql

[Category:Admin] [Category:Fixme] Example.ogg


Related

Wiki: Main_Page