Difference between revisions of "InstallationEDIV"

From VNUML-WIKI
Jump to: navigation, search
(Installing from source .tgz)
(EDIV package installation)
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Title|Installation Guide}}
 
{{Title|Installation Guide}}
 
<span style="color:red"><strong>IMPORTANT NOTE: </strong></span>EDIV documentation is still under construction.
 
  
 
<big>
 
<big>
Line 8: Line 6:
 
  '''Miguel Ferrer Cámara (mferrer at dit.upm.es)'''
 
  '''Miguel Ferrer Cámara (mferrer at dit.upm.es)'''
 
  '''Fermín Galán Márquez (galan at dit.upm.es)
 
  '''Fermín Galán Márquez (galan at dit.upm.es)
  '''version 1.0, Jul 28th, 2008'''
+
  '''version 1.0, Oct 14th, 2008'''
 
</big>
 
</big>
  
Line 19: Line 17:
 
There are two different types of installation: semi-automatic, through a deb package, or manual using a tzg compressed file.
 
There are two different types of installation: semi-automatic, through a deb package, or manual using a tzg compressed file.
  
== Installing from .deb package ==
+
==Installation==
 +
 
 +
=== Installing from .deb package ===
 +
           
 +
            <p>An APT repository has been set up for EDIV related packages (which is the same than the used for VNUML). The installation
 +
            procedure is as follows:</p>
 +
 
 +
<ol>
 +
<li>Add the following line to the /etc/apt/sources.list file:</li>
 +
 
 +
<pre class="box">
 +
deb http://jungla.dit.upm.es/~vnuml/debian binary/
 +
</pre>
 +
 
 +
<li>(Optional) If you want to consider testing version of EDIV, add also to/etc/apt/sources.list file:</li>
 +
 
 +
<pre class="box">
 +
deb http://jungla.dit.upm.es/~vnuml/debian-testing binary/
 +
</pre>
 +
 
 +
<li>Update package list:</li>
 +
 
 +
<pre class="box">
 +
apt-get update
 +
</pre>
 +
 
 +
<li>Install EDIV along the packages it depends on</li>
 +
 
 +
<pre class="box">
 +
apt-get install ediv
 +
</pre>
  
The deb package is not available yet. When available, installation instructions will be updated.
+
</ol>
  
== Installing from source .tgz ==
+
            <p>That's all! :)</p>
 +
 
 +
=== Installing from source .tgz ===
  
 
'''This installation procedure has been developed and tested only under Ubuntu distributions. However, for other GNU/Linux distribution the procedure should be very close.'''
 
'''This installation procedure has been developed and tested only under Ubuntu distributions. However, for other GNU/Linux distribution the procedure should be very close.'''
Line 29: Line 59:
 
This type of installation involves the following steps:
 
This type of installation involves the following steps:
  
=== Download the source file from the web ===
+
==== Download the source file from the web ====  
 
 
Is necessary to download [http://coming.soon the source file] in the computer that is going to act as the EDIV controller. Then it must be decompressed in some place (e.g., /usr/local/src).
 
 
 
=== Configuring the EDIV controller ===
 
  
This step involves the following tasks:
+
Is necessary to download the source file from [http://sourceforge.net/project/showfiles.php?group_id=113582&package_id=293383 here]. Then it must be decompressed in the computer that is going to act as the EDIV controller in some folder (e.g., /usr/local/src).
  
 
==== Perl installation ====
 
==== Perl installation ====
Line 47: Line 73:
 
  apt-get install libmath-round-perl
 
  apt-get install libmath-round-perl
  
* AppConfig and PadWalker perl modules installation:
+
* AppConfig and DBI perl modules installation:
  
  apt-get install libappconfig-perl libpadwalker-perl
+
  apt-get install libappconfig-perl libdbi-perl
  
<span style="color:red"><strong>NOTE: </strong></span> The AppConfig and PadWalker modules can be installed in a manual way (although it is not recommended). To do so, download and install the [http://search.cpan.org/dist/AppConfig/ AppConfig-1.66] and [http://search.cpan.org/dist/PAdWalker PadWalker-1.7] from their corresponding [http://www.cpan.org CPAN] web. The files contain README files with instructions on how to install those modules. Most of the AppConfig and PadWalker installation failures are caused due to the lack of an installed compiler. Try reinstalling them after issuing the following command:
+
<span style="color:red"><strong>NOTE: </strong></span> The AppConfig and DBI modules can be installed in a manual way (although it is not recommended). To do so, download and install the [http://search.cpan.org/dist/AppConfig/ AppConfig] and [http://search.cpan.org/dist/DBI DBI] from their corresponding [http://www.cpan.org CPAN] web. The files contain README files with instructions on how to install those modules. Most of the AppConfig and DBI installation failures are caused due to the lack of an installed compiler. Try reinstalling them after issuing the following command:
  
 
  apt-get install build-essential
 
  apt-get install build-essential
  
==== File placement ====
+
==== EDIV package installation ====
  
 
The installation process consists on placing some files from the .tar.gz package to the /usr/local hierarchy:
 
The installation process consists on placing some files from the .tar.gz package to the /usr/local hierarchy:
  
* The perl-modules/EDIV/*.pm files must be moved to the directory for local Perl modules (e.g., /usr/local/share/perl/5.8.8/EDIV/).
+
* The perl modules 'perl-modules/EDIV/static.pm' and 'perl-modules/EDIV/cluster_host.pm' files must be moved to the directory for local Perl modules (e.g., /usr/local/share/perl/5.8.8/EDIV/).
The src/*.pl files must be placed in the /usr/local/bin/ directory.
+
* The segmentation algorithms perl modules ('perl-modules/algorithms/round_robin.pm' and 'perl-modules/algorithms/weighted_round_robin.pm' are provided by default) files must be moved to '/usr/local/share/ediv/algorithms' directory.
* The etc/cluster.conf file must be placed in the /etc/local/ediv directory.
+
* The src/*.pl files must be placed in the /usr/local/bin/ directory.
 +
* The etc/cluster.conf file must be placed in the /usr/local/etc/ediv directory.
 
* The doc/* files must be placed in /usr/local/share/doc/ediv
 
* The doc/* files must be placed in /usr/local/share/doc/ediv
  
In order to automate this procedure, the package comes with a Makefile that automates all the operation. First, you have to find out what is your directory for Perl local modules (just execute 'perl -V' and check the value of the @INC variable). Then, edit Makefile and configure the MODULES_INSTALL_DEST in the first line with that value (e.g. 'MODULES_INSTALL_DEST=/usr/local/share/perl/5.8.8').
+
In order to automate this procedure, the package comes with a Makefile that automates all the operation. First, you have to find out what is your directory for Perl local modules (just execute 'perl -V' and check the value of the @INC variable, usually at the end of the output). Then, edit Makefile and configure the MODULES_INSTALL_DEST in the first line with that value (e.g. 'MODULES_INSTALL_DEST=/usr/local/share/perl/5.8.8').
  
 
After that, execute the install objectives:
 
After that, execute the install objectives:
Line 76: Line 103:
 
  make modules-uninstall
 
  make modules-uninstall
  
==== SSH server installation ====
+
<span style="color:red"><strong>NOTE: </strong></span> If ''make'' commands fail, it is possible that ''make'' package is not installed. Install it with the following command:
 +
 
 +
apt-get install make
 +
 
 +
== Configuration ==
  
* SSH server installation:
+
=== SSH client ===
  
  apt-get install openssh-server
+
  apt-get install openssh-client
  
NOTE: check that id_rsa.pub and id_rsa.pub files in the /root/.ssh/ folder have been generated after ssh server installation. These files contain the ssh keys necessary for ssh operation. If these files don't exist, issue the following command to generate them:
+
NOTE: check that id_rsa.pub and id_dsa.pub files in the /root/.ssh/ folder have been generated after ssh client installation. These files contain the ssh keys necessary for ssh operation. If these files don't exist, issue the following command to generate them:
  
 
  ssh-keygen -t rsa
 
  ssh-keygen -t rsa
 
  ssh-keygen -t dsa
 
  ssh-keygen -t dsa
  
* SSH server restart:<br/><br/>Issue the following command to ensure proper ssh operation:
+
=== Database ===
 
 
/etc/init.d/ssh restart
 
 
 
==== Database installation and configuration ====
 
  
 
* Install MySQL database:
 
* Install MySQL database:
Line 104: Line 131:
 
  ln -s /usr/share/phpmyadmin/ /var/www
 
  ln -s /usr/share/phpmyadmin/ /var/www
  
* Run the database structure creation script (included in the EDIV source compressed file):
+
* Run the database structure creation script (provided by the EDIV source compressed file or deb package):
  
 
  ediv_db_manage.pl create
 
  ediv_db_manage.pl create
 +
 +
<span style="color:red"><strong>NOTE: </strong></span>This script will fail if you don't edit your /etc/ediv/cluster.conf file to include your database password before running it.
  
 
=== Cluster hosts configuration ===
 
=== Cluster hosts configuration ===
Line 118: Line 147:
 
==== SSH server installation ====
 
==== SSH server installation ====
  
Install the ssh server:
+
* Install the ssh server:
  
 
  apt-get install openssh-server
 
  apt-get install openssh-server
 +
 +
* SSH server restart:<br><br>Issue the following command to ensure proper ssh operation:
 +
 +
/etc/init.d/ssh restart
  
 
==== EDIV controller SSH key importation ====
 
==== EDIV controller SSH key importation ====
Line 130: Line 163:
 
NOTE: to check if the ssh keys exist and how to create them, read [http://www.dit.upm.es/vnumlwiki/index.php/Reference#.3Cssh_key.3E VNUML wiki]
 
NOTE: to check if the ssh keys exist and how to create them, read [http://www.dit.upm.es/vnumlwiki/index.php/Reference#.3Cssh_key.3E VNUML wiki]
  
NOTE: if the controller computer is going to be a member of the cluster (controller and host at the same time) it's necessary to import its own key to the /root/.ssh/authorized_keys file.
+
NOTE: if the controller computer is going to be a member of the cluster (controller and host at the same time) it's necessary to import its own key to the /root/.ssh/authorized_keys file and ssh server installation.
  
'''IMPORTANT REMINDER''': EDIV is now installed, but before trying to use it, a cluster configuration file must be created as described in the user manual.
+
'''IMPORTANT REMINDER''': EDIV is now installed, but before trying to use it, a cluster configuration file must be created as described in the [[UsermanualEDIV|user manual]].

Latest revision as of 23:21, 18 February 2009

Installation Guide

Authors:
Francisco José Martín Moreno (fjmartin at dit.upm.es)
Miguel Ferrer Cámara (mferrer at dit.upm.es)
Fermín Galán Márquez (galan at dit.upm.es)
version 1.0, Oct 14th, 2008


Introduction

To get EDIV working, some configuration must be done in the EDIV controller and also in the hosts that form the cluster. There are two different types of installation: semi-automatic, through a deb package, or manual using a tzg compressed file.

Installation

Installing from .deb package

An APT repository has been set up for EDIV related packages (which is the same than the used for VNUML). The installation procedure is as follows:

  1. Add the following line to the /etc/apt/sources.list file:
  2. deb http://jungla.dit.upm.es/~vnuml/debian binary/
    
  3. (Optional) If you want to consider testing version of EDIV, add also to/etc/apt/sources.list file:
  4. deb http://jungla.dit.upm.es/~vnuml/debian-testing binary/
    
  5. Update package list:
  6. apt-get update
    
  7. Install EDIV along the packages it depends on
  8. apt-get install ediv
    

That's all! :)

Installing from source .tgz

This installation procedure has been developed and tested only under Ubuntu distributions. However, for other GNU/Linux distribution the procedure should be very close.

This type of installation involves the following steps:

Download the source file from the web

Is necessary to download the source file from here. Then it must be decompressed in the computer that is going to act as the EDIV controller in some folder (e.g., /usr/local/src).

Perl installation

  • Perl installation if it wasn't previously installed:
apt-get install perl
  • Perl Math Round library installation:
apt-get install libmath-round-perl
  • AppConfig and DBI perl modules installation:
apt-get install libappconfig-perl libdbi-perl

NOTE: The AppConfig and DBI modules can be installed in a manual way (although it is not recommended). To do so, download and install the AppConfig and DBI from their corresponding CPAN web. The files contain README files with instructions on how to install those modules. Most of the AppConfig and DBI installation failures are caused due to the lack of an installed compiler. Try reinstalling them after issuing the following command:

apt-get install build-essential

EDIV package installation

The installation process consists on placing some files from the .tar.gz package to the /usr/local hierarchy:

  • The perl modules 'perl-modules/EDIV/static.pm' and 'perl-modules/EDIV/cluster_host.pm' files must be moved to the directory for local Perl modules (e.g., /usr/local/share/perl/5.8.8/EDIV/).
  • The segmentation algorithms perl modules ('perl-modules/algorithms/round_robin.pm' and 'perl-modules/algorithms/weighted_round_robin.pm' are provided by default) files must be moved to '/usr/local/share/ediv/algorithms' directory.
  • The src/*.pl files must be placed in the /usr/local/bin/ directory.
  • The etc/cluster.conf file must be placed in the /usr/local/etc/ediv directory.
  • The doc/* files must be placed in /usr/local/share/doc/ediv

In order to automate this procedure, the package comes with a Makefile that automates all the operation. First, you have to find out what is your directory for Perl local modules (just execute 'perl -V' and check the value of the @INC variable, usually at the end of the output). Then, edit Makefile and configure the MODULES_INSTALL_DEST in the first line with that value (e.g. 'MODULES_INSTALL_DEST=/usr/local/share/perl/5.8.8').

After that, execute the install objectives:

make install
make modules-install

The Makefile include also targets to uninstall (just in the case you want to remove EDIV from your computer).

make uninstall
make modules-uninstall

NOTE: If make commands fail, it is possible that make package is not installed. Install it with the following command:

apt-get install make

Configuration

SSH client

apt-get install openssh-client

NOTE: check that id_rsa.pub and id_dsa.pub files in the /root/.ssh/ folder have been generated after ssh client installation. These files contain the ssh keys necessary for ssh operation. If these files don't exist, issue the following command to generate them:

ssh-keygen -t rsa
ssh-keygen -t dsa

Database

  • Install MySQL database:
apt-get install mysql-server
  • Install some program to easily check the database contents (this step is optional). Some suggestions: phpmyadmin or mysql-query-browser.

    To install both of them use the following commands:
apt-get install phpmyadmin
apt-get install mysql-query-browser

NOTE: under ubuntu distributions some problems have been reported after phpmyadmin installation. They are solved issuing the following command:

ln -s /usr/share/phpmyadmin/ /var/www
  • Run the database structure creation script (provided by the EDIV source compressed file or deb package):
ediv_db_manage.pl create

NOTE: This script will fail if you don't edit your /etc/ediv/cluster.conf file to include your database password before running it.

Cluster hosts configuration

The following tasks must be done before using some computer as a cluster member:

VNUML installation

A working installation of VNUML 1.8.4rc1 or newer is required. Following the VNUML installation manual is recommended.

SSH server installation

  • Install the ssh server:
apt-get install openssh-server
  • SSH server restart:

    Issue the following command to ensure proper ssh operation:
/etc/init.d/ssh restart

EDIV controller SSH key importation

Importing the EDIV controller ssh key is required in the members of the cluster. This way the controller can execute commands as root in the hosts that are members of the cluster without requiring a password.

To import the key, edit the host /root/.ssh/authorized_keys file, adding the contents of the controller /root/.ssh/id_dsa.pub file.

NOTE: to check if the ssh keys exist and how to create them, read VNUML wiki

NOTE: if the controller computer is going to be a member of the cluster (controller and host at the same time) it's necessary to import its own key to the /root/.ssh/authorized_keys file and ssh server installation.

IMPORTANT REMINDER: EDIV is now installed, but before trying to use it, a cluster configuration file must be created as described in the user manual.