wiki:doc/install
Last modified 4 years ago Last modified on 11/19/12 10:41:57

Installing Eurêka

Installation Remarks

Eurêka has been successfully installed on GNU/Linux Mandriva and Debian systems. It should work on other operating systems, as long as it fulfills the requirements, although the following instructions are based on GNU/Linux Mandriva .

Installation Requirements

In order to install and use Eurêka in a production environnment you will need :

  • An efficient Web server that support PHP 5 , such as Apache 2.0
  • PHP 5 module for your Web server (tested with PHP 5.0.4)
  • PostgreSQL 7.4.7 or higher (tested with 7.4.7 and 8.0.1)

Installation procedure

Download eureka

  1. Login as root
  2. Download eureka into /var/www
    cd /var/www
    git clone git://coeus.ca/eureka.git
    
  3. Set proper permissions
    chown apache /var/www/eureka -R; chgrp apache /var/www/eureka -R;
    

PostgreSQL Database Installation and Configuration

  1. Install PostgreSQL (if neccessary)
  2. Login as root then switch to the database super-user:
    su postgres
    
  3. Create the PostgreSQL database (do not forget to change --locale to the apporpriate value for your users):
    initdb --encoding=UTF-8 --locale fr_CA.UTF-8 --pgdata=/var/lib/pgsql/data/
    
  4. Add PL/PGSQL stored procedure support. This may require you to install additional packages: TODO: VERIFY IF createlang plpgsql template1 isn't sufficient
    createlang -U postgres plpgsql template1
    
  5. Create the eureka user in PostgreSQL and assign it a password. They must match what you set in php/config/config.php (eureka, eureka by default) :
    createuser -U postgres eureka -A -d -P
    
  6. (Not required for PostgreSQL >= 8.0) You probably want to make sure that PostgreSQL is listening for TCP connections so you can use GUI like PgAdmin3 to manage the database. Check your /var/lib/pgsql/data/postgresql.conf , you may need to add (or uncomment):
    tcpip_socket = true
    
  7. Make sure that you have set the proper permissions to let PHP connect to the PostgreSQL server. If you don't want to use TCP/IP sockets, set the constant CONF_DATABASE_HOST to '' (which is the default) in php/config/config.php and then edit /var/lib/pgsql/data/pg_hba.conf, add:
    host  eureka eureka 127.0.0.1/32   md5
    local eureka eureka                md5
    
    Alternatively, if you'd like to use TCP/IP sockets (i.e when using a system 3-tier architecture), set the constant CONF_DATABASE_HOST to 'localhost' or the hostname of the database server. Then and add the appropriate line in /var/lib/pgsql/data/pg_hba.conf
  8. Change current directory to sql/ in your eureka installation
  9. Import the template database:
    psql -d template1 -U eureka -W -f eureka-postgres.sql
    
    Warning Should you re-run this file to start over, it will delete your entire database and rebuild-it from scratch.
  10. Add PG/PGSQL stored procedures :
    psql -d template1 -U eureka -W -f nested_set_api.sql
    

PHP 5 Installation and Configuration

  1. Install PHP 5 (recommended version is 5.0.4 or newer)
  2. Install the required PHP 5 extensions:
    • dom
    • xsl (apt-get install php5-xsl)
    • psql
    • mbstring
    • curl (apt-get install php5-curl on Ubuntu)
    • PEAR with PEAR:Date class : pear install Date (or apt-get install php5-date on Ubuntu)
    • PEAR:HTML_AJAX class : pear install HTML_AJAX-beta
    • On Mandriva 2007, the following command will install them all:
      urpmi php-pear-Date php-dom php-mbstring php-pgsql
      
  3. Change /php/config/config.php constants to reflect your server configuration.
  4. Do not forget to set SYSTEM_FULL_PATH and BASE_URL_PATH adequately
  5. The following changes are recommended in php.ini
    display_errors = On
    display_startup_errors = On
    max_execution_time = 600
    

Apache configuration

Mandriva example: Creating the following file as /etc/httpd/conf/vhosts.d/demo.eureka.coeus.ca allows eureka to be accessed at the url http://demo.eureka.coeus.ca

<VirtualHost *:80>
    ServerName demo.eureka.coeus.ca
    DocumentRoot /var/www/eureka/html
    <Directory "/var/www/eureka/html">
        allow from all
    </Directory>
    <IfModule mod_php5.c>
        php_value include_path ".:/var/www/eureka/php/:/usr/lib/php/:/usr/share/pear/"
    </IfModule>
</VirtualHost>

LibXML 2

  • Warning As php5-dom package relies on libxml2 , make sure you have the latest version installed. Serious issues have been documented concerning XPath using libxml 2.6.19 (or earlier). You MUST use libxml 2.6.20 or later or you will run into issues with eureka.

Compiling translations

You will need gettext installed (On mandriva: urpmi gettext)

  1. Go to /po and run
    sh compile.sh
    
    , this will compile all languages available.
  2. Restart Apache so that Gettext clears its cache.

Importing system vocabularies

  1. Log into the system Eurêka using admin/admin password.
  2. From the admin interface, got to the vocabulary manager and import the VDEX vocabularies necessary for the system to function. They are stored in /sql/vocabularies-vdex.xml

Appendix: Manual PEAR Installation

The procedure below is for PHP 5.0.2 under Mandrake 10.1. You WILL need to adapt it under other distributions. Note that installing pear manually is usually not necesasry.

All necessary RPM packages are available in the contrib urpmi source. If you don't have a contrib source already, you can add one with the command: urpmi.addmedia contrib http://gulus.usherbrooke.ca/pub/distro/Mandrakelinux/official/10.1/i586/media/contrib with media_info/hdlist.cz

You'll need the following packages:

  • libphp5-commons
  • php5-cli
  • php5-devel
  • php5-xml
  • php5-xmlrpc depends on libxmlrpc ( provides PEAR auto installation ).
  • libphp5-commons
  • libphp5-commons

The following command should install them all and resolve dependencies : urpmi php5-cli php5-devel php5-xml php5-xmlrpc . To install PEAR, run this in a shell : lynx -source http://go-pear.org | php5 .

Warning: You must have PHP5 CLI with php5ize installed NB : By default Mandrake renames the PHP binaries with a 5 suffix. You should create symbolic links so that you can use standard scripts:

ln -s /usr/bin/php5 /usr/bin/php 
ln -s /usr/bin/php5ize /usr/bin/phpize