Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


samedi 28 août 2010

Hobbit-client 4.3 et Serveur Hobbit 4.2

A la maison, j'ai mon serveur Hobbit qui tourne sous 4.2. Sur gemini (une des machines clientes), je viens tout juste d'installer hobbit-client.

Malheureusement c'est un hobbit-client version 4.3 car gemini est une Ubuntu Lucid Lynx 10.04

Installlation du client

apt-get install hobbit-clientl hobbit-plugins
Lors de l'installation, il faudra préciser l'IP du serveur Hobbit

Ensuite, il faut modifier le fichier pour supprimer le sufixe davidgis.fr à  la ligne CLIENTHOSTNAME="gemini" au lieu de CLIENTHOSTNAME="gemini.davidgis.fr"

root@gemini:~# cat /etc/default/hobbit-client
# Configure the Hobbit client settings.

# You MUST set the list of Hobbit servers that this
# client reports to.
# It is good to use IP-adresses here instead of DNS
# names - DNS might not work if there's a problem.
# (Internally this will be translated to BBDISP and BBDISPLAYS
# variables in /var/run/hobbit/bbdisp-include.cfg)
#
# E.g. (a single Hobbit server)
#   HOBBITSERVERS="192.168.1.1"
# or (multiple servers)
#   HOBBITSERVERS="10.0.0.1 192.168.1.1"

HOBBITSERVERS="192.168.2.242"

# Hostname used by the client for its reports.
# Must match the name for this host in the Hobbit servers'
# bb-hosts file.

root@gemini:~# cat /etc/default/hobbit-client
# Configure the Hobbit client settings.

# You MUST set the list of Hobbit servers that this
# client reports to.
# It is good to use IP-adresses here instead of DNS
# names - DNS might not work if there's a problem.
# (Internally this will be translated to BBDISP and BBDISPLAYS
# variables in /var/run/hobbit/bbdisp-include.cfg)
#
# E.g. (a single Hobbit server)
#   HOBBITSERVERS="192.168.1.1"
# or (multiple servers)
#   HOBBITSERVERS="10.0.0.1 192.168.1.1"

HOBBITSERVERS="192.168.2.242"

# Hostname used by the client for its reports.
# Must match the name for this host in the Hobbit servers'
# bb-hosts file.

CLIENTHOSTNAME="gemini"

Configuration cà´té serveur

On ajoute la ligne suivante dans le fichier /etc/hobbit/bb-hosts
melina-xen06:~# head -n35 /etc/hobbit/bb-hosts 
###############################################################################################
# $Id: bb-hosts 55 2010-08-28 18:19:20Z david $
###############################################################################################
# Master configuration file for Hobbit
#
# This file defines several things:
#
# 1) By adding hosts to this file, you define hosts that are monitored by Hobbit
# 2) By adding "page", "subpage", "group" definitions, you define the layout
#    of the Hobbit webpages, and how hosts are divided among the various webpages 
#    that Hobbit generates.
# 3) Several other definitions can be done for each host, see the bb-hosts(5)
#    man-page.
#
# You need to define at least the Hobbit server itself here.

#0.0.0.0        .default.       # NOPROPRED:+apt,+libs

group Serveurs physiques
192.168.2.1	olivia		# http://olivia.davidgis.fr disk memory COMMENT:"Serveur 1 - principal (FireWall/Web/QMail/Samba/LDAP"
192.168.2.6	monroe		# http://monroe.davidgis.fr disk memory oratns COMMENT:"Serveur 2  - Lighttpd/Oracle"
192.168.2.8	melina		# disk memory	COMMENT:"Serveur 3 - Xen"
192.168.2.14	gemini		# cpu disk memory	COMMENT:"Serveur 4 - Multimedia (FreeBox/TV)"

group Serveurs virtuels sous Xen
192.168.2.252	melina-xen01	# disk memory COMMENT:"Bases MySQL/PostgreSQL"
192.168.2.250	melina-xen02	# disk memory COMMENT:"Squid"
192.168.2.248   melina-xen03    # disk memory COMMENT:"FreeRadius"
192.168.2.244	melina-xen04	# disk memory COMMENT:"Windows XP"
192.168.2.246	melina-xen05	# disk memory COMMENT:"P3Scan/ClamAV/SpamAssassin"
127.0.0.1       melina-xen06    # bbd http://melina-xen06/ COMMENT:"Serveurs Web internes/SVN"
192.168.2.238	melina-xen07	# disk memory COMMENT:"Bases Oracle"
Ce qui donnera donc ceci

Suppression du test pour apt

  1. Cà´té Client:

    Depuis gemini (client), il faut décommenter la ligne '#DISABLED' dans le fichier. Pour le coup, un petit sed interactif devrait suffire
    root@gemini:~# cat /etc/hobbit/clientlaunch.d/apt.cfg
    [apt]
    	#DISABLED
    	ENVFILE /etc/hobbit/hobbitclient.cfg
    	CMD $HOBBITCLIENTHOME/ext/apt
    	LOGFILE /var/log/hobbit/hobbitclient.log
    	INTERVAL 5m
    root@gemini:~# sed -i "s:#::g" /etc/hobbit/clientlaunch.d/apt.cfg
    root@gemini:~# cat /etc/hobbit/clientlaunch.d/apt.cfg
    [apt]
    	DISABLED
    	ENVFILE /etc/hobbit/hobbitclient.cfg
    	CMD $HOBBITCLIENTHOME/ext/apt
    	LOGFILE /var/log/hobbit/hobbitclient.log
    	INTERVAL 5m
    
  2. Cà´té Serveur:

    On voit que le test est toujours actif
    melina-xen06:~# /usr/lib/hobbit/server/bin/bb 127.0.0.1 "hobbitdboard test=apt fields=hostname"
    gemini
    
    Il faut donc le dropper
    TEST=apt;
    /usr/lib/hobbit/server/bin/bb 127.0.0.1 "hobbitdboard test=$TEST fields=hostname"| \
     while read H;
     do
        /usr/lib/hobbit/client/bin/bb 127.0.0.1 "drop $H $TEST";
    done
    
    On vérifie
    melina-xen06:~# /usr/lib/hobbit/server/bin/bb 127.0.0.1 "hobbitdboard test=apt fields=hostname"
    melina-xen06:~# 
    
    

mercredi 25 août 2010

Compilation de libtorrent 0.12.6 et rtorrent 0.8.6

Remarque: Ce billet est une mise à  jour de mon premier billet concernant la première compilation de libtorrent/rtorrent

Les commandes sont

wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
tar xvzf libtorrent-0.12.6.tar.gz 
cd libtorrent-0.12.6
./configure && make && make install
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz -O - | tar xvz 
cd rtorrent-0.8.6/
./configure && make && make install
ldconfig && ./configure && make && make install