Installation
------------

In order to install EMIR, it is required to install 
the SUN or OpenJDK Java 6 (JRE or SDK). If not installed 
on your system, you can download it from http://java.oracle.com[http://java.oracle.com]

* Linux based operating system
* MongoDB[www.mongodb.org]

EMIR is distributed in the following formats:

* Platform independent format, provided in "tar.gz" format 
* RPM package, suitable SL5/SL6 and other Fedora based Linux derivatives (RedHat, CentOS etc...)
* Debian package
 
[NOTE]
.IMPORTANT NOTE ON PATHS
=========================================================
The location of the installation and configuration files differ 
depending on type of bundle (see the above section).

If RPM bundle is chosen, the following paths will be used:
  
  CONF=/etc/emi/emir
  BIN=/usr/sbin
  LOG=/var/log/emi/emir
  
The platform independent binary bundles all the files under
single directory. Thus if extracted:

  CONF=INST/conf
  BIN=INST/bin
  LOG=INST/logs
  
The above variables (CONF, BIN and LOG) will be used throughout the rest of this manual.
=========================================================

Installation from the self-contained archive (tar.gz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to generate, build and install the self contained binary it is required to follow the
steps written below:

.Creating the Bundle
. check out the source code from *git://github.com/eu-emi/emiregistry.git*
. go to *SOURCE_ROOT/emir-dist* directory
. run *mvn assembly:assembly -DskipTests*

The archive can then be found inside the *SOURCE_ROOT/target/emir-distribution-x.y.z-a-all.(tar.gz/zip)*, 
that contains all the necessary files for installation thus no special actions will be required except 
extraction to the target folder.

Installation using the RPM bundle (RedHat Distributions)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Download the RPM distribution from the EMI's http://emisoft.web.cern.ch/emisoft/[emisoft] and install it
using the rpm or yum command.
 

Database Installation
~~~~~~~~~~~~~~~~~~~~~

EMIR uses MongoDB to store the service records, therefore it is highly recommended to install 
and configure the database before starting the EMIR server. The installation and configuration 
instructions to setup the MongoDB database can be found 
on their http://www.mongodb.org/display/DOCS/Quickstart[Web site].
  

 
