
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 an RPM available for Scientific Linux 5 platform. 
This RPM is tested on Scientific Linux, but should work without any problems with recent
version of Centos (e.g. Centos 5.5), Fedora (e.g. Fedora 13, 14) and other Red Hat derivatives.

[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 a final folder. No further actions are required.


Installation from the RPM package (RedHat distributions)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Download RPM package from UNICORE download site and install it using the rpm command as root user:

  $ rpm -i unicore-uvos-server-1.4.1.noarch.rpm  

You can also (what is suggested) use yum to install and subsequently update the UVOS server.
The yum installation may be performed as follows (note that first command is
needed only if you have not yet installed the EMI yum repository):

  $ wget --no-check-certificate \
  https://twiki.cern.ch/twiki/pub/EMI/EMI-1/rc1.repo \
  -O /etc/yum.repos.d/emi-1.repo
  $ yum 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.

