LTPDA Repository README and Installation Guide

1.0 Software requirements

Software tested versions should work on
Apache 2.2.6 >2.0
MySQL 5.0 >4.0
PHP 5.2.4 >4.0
Sendmail ? ?
Ruby* ? ?
Gnuplot* 1.8.7 ?
* needed for on-line plot generation

You can use postfix or qmail instead, they provide a sendmail wrapper. For more information see http://de2.php.net/manual/en/ref.mail.php.

1.1 Browsers

Software tested versions should work on
Firefox 2.0.0.8 >1.0
Konqueror 3.5.8 >2.0
Opera 9.5 >8.0

Useful information

Viewing the data

When you want to have a look at the XML data in the "objs" table, you should be aware of some facts: By default, the output is cut off at 500 characters, every single line is cut off at 100 characters. This is necessary, since the XML data is very large and the tables will be unusable. If you want to view the XML data of a certain entry, just use the default settings, download the file of your choice and use your favorite XML viewer software.

Internal names

Tables and columns for the data sets must not contain any other characters than alphanumeric, underscore (_) or a dash (-)

Custom querys

When executing a custom query, the script reconnects to the database with the login data of the user. This prevents, that the user can access or even modify more data than he is allowed to. As the passwords are saved md5 encrypted, the user has to supply his password, everytime he wants to execute a query.

Clean Installation

First check that the server machine on which you want to run an LTPDA Repository has a working apache server with properly configured PHP support complete with the PHP MySQL modules. Also check that a MySQL server is running and that you have the root access for the machine and the MySQL server.

Configure MySQL Server

The MySQL server should be configured (in my.cnf) to have:

  • max_allowed_packet = 256M
Then restart the MySQL server by doing, for example, /etc/init.d/mysqld restart

Configuring Apache

The apache server needs to be configured (in php.ini) to have: memory_limit = 256M. You need to restart the apache server after this change.

Installing the PHP code

Installing an LTPDA Repository from scratch, then requires the following steps (may be slightly different on different Linux distributions):

  1. Unzip the repository source files
  2. Copy all files/folders contained within the unzipped folder to the apache html folder. For example:
    # cp -r * /var/www/html/ltpdarepo
  3. Check that the apache server is running
  4. Change the owner of the repository files:
    # cd /var/www/html
    # chown -R apache:apache ltpdarepo
  5. Change permissions of the config file.
    # cd ltpdarepo
    # chmod a+w config.inc.php
  6. Confirm the MySQL server is running.
  7. Start the install procedure by opening a web-browser (either on the server, or another client machine) and enter the URL http://my.servermachine.com/ltpdarepo/install.php
  8. Follow the on-screen instructions
  9. After all that, delete the file install.php and change the permissions of config.inc.php back to # chmod 640 config.inc.php

Installing the LTPDA Repository Robot

The LTPDA Repository includes an additional program which is intended to be used for two purposes:

  1. To generate plots of data in the repository on demand (when the use clicks on a object in the web interface)
  2. To generate dumps of the XML data to a specified directory. This is intended to be run via crontab.

Setting up the on-demand plot generation

  1. On the web-interface, go to "general options"
  2. Check/set the paths in the section "Repository Robot", for example:

    Internal path to plot and meta files:/var/www/html/ltpdarepo/plots
    External path to plot files:http://my.servermachine.com/ltpdarepo/plots
    Path to ltpda repo robot:/var/www/html/ltpdarepo/ltpdareporobot.rb
    (remember to click save if you make any changes)

Setting up the XML dump as a cron job

This is to make XML dumps via root's crontab.

  1. Copy ltpdareporobot.rb and run_multi-core.sh to /root/bin
  2. Make sure that /root/bin is only readable by root
  3. chmod 700 /root/bin
  4. Edit run_multi-core.sh and follow the comments in the file.
  5. Add an entry to root's crontab to execute run_multi-core.sh periodically.

Updating V2.4 to V2.5

  1. Make sure you have a recent backup of both the php files and all databases
  2. Copy all the files from the .zip file into your ltpdarepo directory, overwrite existing files (e.g. /var/www/ltpdarepo)
  3. Change the owner of the files to the webserver (e.g. chown -R www-data: www-data /var/www/ltpdarepo)
  4. Log in as an adminstrator to update the administrational database
  5. Follow the instructions shown at the bottom of the index page
Further details are contained in the included read-me file.

This is a major upgrade for LTPDA repositories. After updating the web-interface, the underlying database layout can/should be upgraded using the included ruby script. NOTE: the server should be taken off-line during the upgrade process to avoid any conflicts.

Updating V2.3 to V2.4

Unzip the new repository package and copy all php files except install.php, install_dump.php, and config.inc.php.
Next change the ownership of these copied files to apache:apache (see installation procedure above, for details). Following this, log on to the LTPDA Repository web interface. You should be informed that the repository has been updated.

Updating V2.2 to V2.3

Unzip the new repository package and copy all php files except install.php, install_dump.php, and config.inc.php.
Next change the ownership of these copied files to apache:apache (see installation procedure above, for details). Following this, log on to the LTPDA Repository web interface. You should be informed that the repository has been updated.

Updating V2.1 to V2.2

Unzip the new repository package and copy the following files to the existing repository installation.

aorepo_db.sql
show_database.php
update.inc.php
version.inc.php
create_user.php
delete_user.php

For example, do:

# cp show_database.ph aorepo_db.sql update.inc.php version.inc.php create_user.php delete_user.php /var/www/html/ltpdarepo/

Next change the ownership of these copied files to apache:apache (see installation procedure above, for details). Following this, log on to the LTPDA Repository web interface. You should be informed that the repository has been updated. Note: some tables are re-indexed during this update, so this may take some time depending on your table sizes. If you have really big database tables then it may be best to run the update.inc.php script from a terminal on the server.
		# php update.inc.php
	

Updating V2.0 to V2.1

Unzip the new repository package and copy the following files to the existing repository installation.

show_data.php
show_database.php
sync.inc.php
aorepo_db.sql
update.inc.php
version.inc.php
ltpdareporobot.rb

For example, do:

# cp ltpdareporobot.rb show_data.php show_database.php sync.inc.php aorepo_db.sql update.inc.php version.inc.php /var/www/html/ltpdarepo/

Next change the ownership of these copied files to apache:apache (see installation procedure above, for details). Following this, log on to the LTPDA Repository web interface. You should be informed that the repository has been updated.