Installing EPrints and eCrystals

From eCrystals Federation Project

Jump to: navigation, search

This tutorial was compiled using a Debian-based distribution of the Linux operating system (Ubuntu, "Hardy Heron").

All commands are prefixed with root@ubuntu$ (please ensure that you are logged in to a terminal as root before proceeding)


Prepare the Operating System

Please ensure that all the operating system and all pre-installed applications are up-to-date using the apt-get command:

 root@ubuntu$  apt-get update
 root@ubuntu$  apt-get upgrade

Please Note: You may need to restart your system and/or execute the upgrade command several times before your system is completely up-to-date.

Install EPrints Dependencies

In order to host an EPrints repository, your system must be configured for a LAMP architecture (Linux, Apache, MySQL and Perl).

 root@ubuntu$  apt-get install apache2-mpm-prefork libapache2-mod-perl2 php5 php5-mysql mysql-server

You will be prompted by the installer to configure a password for the MySQL root account.

The following utilities are required by EPrints:

 root@ubuntu$  apt-get install gzip tar unzip make lynx wget ncftp ftp gs xpdf antiword elinks pdftk tetex-bin psutils imagemagick

Install eCrystals Dependencies

eCrystals clients use Jmol, the open-source Java applet, to manipulate three-dimensional representations of crystallography structures.

Please note that Java is only required if this system is being used as a client.

 root@ubuntu$  apt-get install sun-java6-jre sun-java6-fonts sun-java6-plugin

Please note that the sun-java6-plugin package is targeted at the Firefox Web browser.

eCrystals uses Open Babel, the open-source programming library and toolbox for Chemical Information, to search, analyse and convert data from molecular modeling, chemistry and crystallography areas. To install Open Babel, please use the following command:

 root@ubuntu$  apt-get install openbabel

Upgrade XML::LibXML Perl Module

EPrints 3.0.3-RC1 requires the XML::LibXML Perl module (version 1.63 or higher).

In order to build and install the module, the C and C++ equivalent libraries must be installed on your system:

 root@ubuntu$  apt-get install libxml1 libxml2 xml2 libxml-dev libxml2-dev libxml-perl libxml-libxml-perl libxml-parser-perl
 root@ubuntu$  apt-get install libunicode-string-perl libterm-readkey-perl libmime-lite-perl libdbd-mysql-perl

It is now time to utilize CPAN:

 root@ubuntu$  cpan

You will be prompted to configure CPAN. The default settings are usually correct and can be accepted by pressing Enter (check the square brackets). The continent code for Europe is 4, the country code for the United Kingdom is 31.

 cpan>  install XML::LibXML

If you are prompted to install any dependencies, type Y and press Enter.

 cpan>  exit

Configure Unix UserID and GroupID

Your system must be configured in order to give EPrints permission to execute properly:

 root@ubuntu$  adduser --system --home /opt/eprints3 --shell /bin/bash --group eprints 
 root@ubuntu$  adduser www-data eprints

Download and Install EPrints 3.0.3-RC1

You can download and extract the contents of the archive using the mouse or with the following commands:

 root@ubuntu$  wget
 root@ubuntu$  tar -xzvf eprints-3.0.3-rc-1.tar.gz
 root@ubuntu$  cd eprints-3.0.3-rc-1

Now it is time to configure and install EPrints:

 root@ubuntu$  ./configure --with-smtp-server=your.smtp.server
 root@ubuntu$  ./

EPrints is now installed in the /opt/eprints3 directory.

Download and Install eCrystals Alpha

Please switch to the eprints user account before installing eCrystals.

The eprints account does not have a password and can only be accessed using the su (switch user) command:

 root@ubuntu$  su eprints

You can download and extract the contents of the archive using the mouse or with the following commands:

 eprints@ubuntu$  wget
 eprints@ubuntu$  tar -xzvf ecrystals-alpha.tar.gz
 eprints@ubuntu$  cd ecrystals-alpha

eCrystals is installed using the cp (copy) command:

 eprints@ubuntu$  cp -a ./eprints3 /opt/eprints3

You can now exit from the eprints user shell:

 eprints@ubuntu$  exit

Configure Apache

Apache must be configured in order for EPrints content to be hosted properly:

 root@ubuntu$  touch /etc/apache2/sites-available/eprints

Add the following line to /etc/apache2/sites-available/eprints

 Include /opt/eprints3/cfg/apache.conf

Then enable the Web site using this command:

 root@ubuntu$  a2ensite eprints

Configure the EPrints Indexer Service

The EPrints Indexer must be configured to start automatically as a service when the system is rebooted:

 root@ubuntu$  ln -s /opt/eprints3/bin/epindexer /etc/init.d/epindexer
 root@ubuntu$  update-rc.d epindexer defaults 99 99

Enable eCrystals Housekeeping Tasks

Cron (the Unix task scheduler) must be configured in order for eCrystals to perform regular housekeeping and administration tasks. Please add the following line to /etc/crontab:

 01 3    * * *   eprints /opt/eprints3/bin/ecrystals/cronrun

eCrystals provides support for Document Object Identifiers (DOIs). If you wish to use this feature, please uncomment the line for the /opt/eprints3/bin/ecrystals/doi task in /opt/eprints3/bin/ecrystals/cronrun.

Restart Your System

Before you create an archive, it is vital that you restart your computer to apply any remaining updates and to ensure that all system services are available.

Create an eCrystals Archive

Congratulations!! You have now installed EPrints and eCrystals. Follow the guide in the main eCrystals documentation to configure an archive.

Personal tools