Outils personnels

Installation de l'agent fusioninventory : Différence entre versions

De wikiGite

Ligne 65 : Ligne 65 :
 
  OCSMODE[0]=daemon
 
  OCSMODE[0]=daemon
 
  OCSSERVER[0]=<nowiki>https://<adresse_serveur_glpi>/plugins/fusioninventory/</nowiki>
 
  OCSSERVER[0]=<nowiki>https://<adresse_serveur_glpi>/plugins/fusioninventory/</nowiki>
Et éventuellement
+
Et éventuellement (voir [Assigner_des_machines_à_des_entités_automatiquement_avec_les_TAG])
 
  OCSTAG[0]=MyTAGforMatchingGLPIrule
 
  OCSTAG[0]=MyTAGforMatchingGLPIrule
  
 
Démarrer le daemon :
 
Démarrer le daemon :
 
  /etc/init.d/fusioninventory-agent start
 
  /etc/init.d/fusioninventory-agent start

Version du 15 octobre 2012 à 12:08

Installation sur Debian Squeeze

Il est impératif d'utiliser le dépôt de Fusioninventory, la version de l'agent sur le dépôt Squeeze n'étant pas a jour. Editez le fichier /etc/apt/sources.list et ajoutez-y la ligne :

deb http://debian.fusioninventory.org/debian/ stable main

Enregistrez la signature du paquet :

wget -O - http://debian.fusioninventory.org/debian/archive.key | apt-key add -

Pré-requis (Pour discuter en https avec votre serveur) :

apt-get install libcrypt-ssleay-perl

Installation de l'agent :

apt-get install fusioninventory-agent

Configuration :

fusioninventory-agent-config

Répondre aux questions :

Do you want to configure the agent
Please enter 'y' or 'n'?> [y] y
Load settings from /etc/fusioninventory/agent.cfg
[info] The config file will be written in /etc/fusioninventory/agent.cfg,
What is the address of your ocs server?> [http://ocsinventory-ng/ocsinventory] http://<adresse_serveur_glpi>/plugins/fusioninventory/
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n] n
Do you want to apply an administrative tag on this machine
Please enter 'y' or 'n'?> [y] n
/usr/bin/fusioninventory-agent
FusionInventory Agent found: /usr/bin/fusioninventory-agent
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y] y
[info] PROLOG_FREQ has been set: 24)
[info] Module FusionInventory::Agent::Task::OcsDeploy is not installed.
[info] Module FusionInventory::Agent::Task::SNMPQuery is not installed.
[info] Module FusionInventory::Agent::Task::NetDiscovery is not installed.
################################
New settings written! Thank you for using FusionInventory!
  http://www.FusionInventory.org

Activer le daemon : Editer le fichier de configuration du daemon et remplacer mode=CRON par mode=DAEMON:

vi /etc/default/fusioninventory-agent

Démarrer le daemon :

/etc/init.d/fusioninventory-agent start

Installation sur CentOS

Les dépôts de Remi et RPMForge doivent avoir été paramétrés au préalable.

yum install --enablerepo=remi --enablerepo=rpmforge fusioninventory-agent

Le paquet RPM malheureusement ne fournit pas d'assistant pour la configuration. Il fournit deux fichiers de configuration :

  • Pour tout : /etc/fusioninventory/agent.cfg. Il faut donc le remplir manuellement.

Par exemple :

share-dir=/usr/lib/perl5/vendor_perl/5.8.8/auto/share/dist/FusionInventory-Agent
basevardir=/var/lib/fusioninventory-agent
logger=Stderr
server="https://<adresse_serveur_glpi>/plugins/fusioninventory/"
no-ssl-check=1
tag=MyTAGforMatchingGLPIrule

L'option "no-ssl-check" est bien utile si le serveur GLPI est accessible en HTTPS uniquement, avec un certificat auto-signé...

  • Pour le démon et les tâches cron uniquement: /etc/sysconfig/fusioninventory-agent. Les options de ce fichier se cumulent ou écrasent les valeurs du fichier agent.cfg.

Ce dernier doit contenir au minimum:

PATH=/sbin:/bin:/usr/sbin:/usr/bin
FUSINVOPT='--debug --rpc-trust-localhost'
OCSMODE[0]=daemon
OCSSERVER[0]=https://<adresse_serveur_glpi>/plugins/fusioninventory/

Et éventuellement (voir [Assigner_des_machines_à_des_entités_automatiquement_avec_les_TAG])

OCSTAG[0]=MyTAGforMatchingGLPIrule

Démarrer le daemon :

/etc/init.d/fusioninventory-agent start