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 .
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)
- Login as root
- Download eureka into /var/www
cd /var/www git clone git://coeus.ca/eureka.git
- Set proper permissions
chown apache /var/www/eureka -R; chgrp apache /var/www/eureka -R;
PostgreSQL Database Installation and Configuration
- Install PostgreSQL (if neccessary)
- Login as root then switch to the database super-user:
- 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/
- 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
- 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
- (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
- 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 md5Alternatively, 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
- Change current directory to sql/ in your eureka installation
- Import the template database:
psql -d template1 -U eureka -W -f eureka-postgres.sqlWarning Should you re-run this file to start over, it will delete your entire database and rebuild-it from scratch.
- Add PG/PGSQL stored procedures :
psql -d template1 -U eureka -W -f nested_set_api.sql
PHP 5 Installation and Configuration
- Install PHP 5 (recommended version is 5.0.4 or newer)
- Install the required PHP 5 extensions:
- xsl (apt-get install php5-xsl)
- 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
- Change /php/config/config.php constants to reflect your server configuration.
- Do not forget to set SYSTEM_FULL_PATH and BASE_URL_PATH adequately
- The following changes are recommended in php.ini
display_errors = On display_startup_errors = On max_execution_time = 600
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>
- 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.
You will need gettext installed (On mandriva: urpmi gettext)
- Go to /po and run
sh compile.sh, this will compile all languages available.
- Restart Apache so that Gettext clears its cache.
Importing system vocabularies
- Log into the system Eurêka using admin/admin password.
- 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:
- php5-xmlrpc depends on libxmlrpc ( provides PEAR auto installation ).
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