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

Only UNIX systems are supported for installation of the UVOS server and UVOS client tools. 
Manual installation on Windows is possible assuming that start scripts are converted
to Windows BAT files.

UVOS is distributed in the following formats:

 1. As a platform independent installation archive.
 2. As a binary, platform-specific packages available currently for Scientific Linux 5,
 Scientific Linux 6 and Debian 6 platforms. Those packages are tested on
 the enumerated platforms, but should work without any problems with other versions of 
 similar distributions (e.g. version for SL6 works well on Centos 6 or recent Fedora 
 distributions. Differences between SL5 and SL6 version are only in the RPM tools used 
 to create packages (so SL5 version should be more universal, while SL6 version can require
 a newer rpm software).  

[NOTE]
.IMPORTANT NOTE ON PATHS
=========================================================
UVOS is distributed either as an platform independent and portable archive 
or as an  installable, platform dependent package such as RPM. 
After installation paths to files are different depending on installation
source used. If installing using distribution-specific package the following paths
are used:

  CONF=/etc/unicore/uvos-server
  BIN=/usr/sbin
  LOG=/var/log/unicore/uvos-server

If installing using portable archive all UVOS files are installed under a
single directory. Path prefixes used then are as follows, where INST is a
directory where UVOS was installed:

  CONF=INST/conf
  BIN=INST/bin
  LOG=INST/log

The above variables (CONF, BIN and LOG) are used throughout the rest of this manual.
=========================================================

Installation from the archive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Download the UVOS server archive from the UNICORE project website. It is enough to unpack 
the contents of the archive into the chosen destination folder. No further actions are required.


Installation from RPM package (RedHat distributions) 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The preferred way is to use Yum  to install (and subsequently update) UVOS.

To perform the Yum installation, EMI Yum repository must be installed first. 
Refer to the EMI release documentation (available at the EMI website http://www.eu-emi.eu/releases ) 
for detailed instructions. Typically installation of the EMI repository requires to 
download a single RPM file and install it. 

After the EMI repository is configured, the following command installs UVOS server:
 
 $> yum install unicore-uvos-server


Installation from the DEB package (Debian distributions) 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	
The preferred installation way is to use apt to install and subsequently update UVOS.
	 
To perform the apt installation, EMI apt repository must be installed first. 
Refer to the EMI release documentation (available at the EMI website http://www.eu-emi.eu/releases ) 
for detailed instructions. Typically installation of the EMI repository requires to 
download a single DEB file and install it. 

After the EMI repository is configured, the following command installs UVOS server:

 $> apt-get install unicore-uvos-server


Database installation
~~~~~~~~~~~~~~~~~~~~~
If you wish to do a quick setup (for small or medium installation) you can use an embedded
database, which is supplied within distribution. In this case you can skip to the
xref:configuration[Configuration] section as the embedded DB is installed 
by default and you need only to invoke initialization script.
 
Otherwise you should follow this section to install and configure a standalone DBMS. 

PostgreSQL
^^^^^^^^^^
Ensure that PostgreSQL database is installed on your system. Login as postgresql
user, add a password protected user for the UVOS server and then create a database:

  $ createuser <USERNAME> -P
  $ createdb uvosdb -O <USERNAME>

Finally, verify if everything is correct, by manually logging to the newly created database:

  $ psql -h localhost -U <USERNAME> uvosdb

If there is connection problem verify the PostgreSQL configuration in the pg_hba.conf file. 
Check, if there are correct settings allowing for local connections, e.g. like those:

 # IPv4 local connections:
 host    uvosdb         all         127.0.0.1/32          md5
 # IPv6 local connections:
 host    uvosdb         all         ::1/128               md5
 
Order of lines in this file is important so in general the above lines should be at the beginning.

NOTE: From version 1.2 the UVOS distribution contains a PostgreSQL driver so there is no need to
set it up manually.

MySQL
^^^^^
Ensure that MySQL database is installed and started on your system. Connect to the database
with the +mysql+ program as user with privelages to create databases and create new users. 
Next create a UVOS database and a user who can access it:
 
  mysql> create database uvosdb;
  mysql> grant all on uvosdb.* to 'USERNAME'@'127.0.0.1' 
  IDENTIFIED BY 'PASSWORD';
  
Finally, verify if everything is correct, by manually logging to the newly created database:

  $ mysql -h localhost -U <USERNAME> uvosdb


Other DBMSes
^^^^^^^^^^^^
Although currently no other DBMSes are supported, it is fairly easy to set it up. 
It requires porting the SQL database structure creation script to the chosen DBMS 
SQL flavour. If you want to do this feel free to contact us.

