Les deux révisions précédentes
Révision précédente
Prochaine révision
|
Révision précédente
Dernière révision
Les deux révisions suivantes
|
tuto:linux_divers:installer_fusioninventory_pfsense [30/08/2016 15:44] dani |
tuto:linux_divers:installer_fusioninventory_pfsense [23/11/2017 19:09] dani [PfSense 2.3.x / 2.4.x] |
L'agent d'inventaire FusionInventory permet de remonter les informations sur le matériel et le logiciel dans GLPI. Voici une petite procédure pour l'installer sur PfSense (testé uniquement sur pfsense 2.1-BETA0) | L'agent d'inventaire FusionInventory permet de remonter les informations sur le matériel et le logiciel dans GLPI. Voici une petite procédure pour l'installer sur PfSense (testé uniquement sur pfsense 2.1-BETA0) |
| |
* Installation de l'agent et de ses dépendances | ===== PfSense 2.1.x ===== |
<code bash> | <code bash> |
pkg_add -v -r p5-FusionInventory-Agent | pkg_add -v -r p5-FusionInventory-Agent |
</code> | </code> |
| |
* Depuis pfsense 2.2, il faut utiliser: | ===== PfSense 2.2.x ===== |
| |
<code bash> | <code bash> |
</code> | </code> |
| |
* Et avec la 2.3, les dépôt de FreeBSD étant désactivé, il faut gérer les dépendances manuellement | ===== PfSense 2.3.x / 2.4.x ===== |
| |
| * Éditer /usr/local/etc/pkg/repos/FreeBSD.conf et mettre le dépôt FreeBSD à yes |
| * Éditer /usr/local/etc/pkg/repos/pfSense.conf et mettre le dépôt FreeBSD à yes |
| |
<code bash> | <code bash> |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-ExtUtils-Manifest-1.70.txz | pkg install p5-FusionInventory-Agent p5-LWP-Protocol-https |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-ExtUtils-MakeMaker-7.18.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Text-Template-1.46_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Compress-Raw-Zlib-2.069.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-File-Which-1.21.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Net-SSLeay-1.74.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Socket-2.021.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-IO-Socket-IP-0.37.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-URI-1.71.txz | |
pkg install p5-Mozilla-CA | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-IO-Socket-SSL-2.029.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Net-HTTP-6.09.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Encode-Locale-1.05.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-IO-HTML-1.001_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTTP-Date-6.02_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-LWP-MediaTypes-6.02_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTTP-Message-6.11.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTTP-Daemon-6.01_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTTP-Negotiate-6.01_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-WWW-RobotRules-6.02_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTTP-Cookies-6.01_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTML-Tagset-3.20_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-HTML-Parser-3.72.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-File-Listing-6.04_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Digest-HMAC-1.03_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Authen-NTLM-1.09_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-libwww-6.15.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/pciids-20160621.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/libpci-3.5.1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/pciutils-3.5.1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-UNIVERSAL-require-0.18.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-XML-TreePP-0.43.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Net-IP-1.26_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-LWP-Protocol-https-6.06_1.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-Proc-Daemon-0.23.txz | |
pkg add http://pkg.freebsd.org/freebsd:10:x86:64/quarterly/All/p5-FusionInventory-Agent-2.3.17.txz | |
</code> | </code> |
| |
* Création de la configuration | * Remettre le dépôt FreeBSD à no dans les deux fichiers |
| ===== Création de la configuration ===== |
<code bash> | <code bash> |
mkdir -p /usr/local/etc/fusioninventory/ | mkdir -p /usr/local/etc/fusioninventory/ |
user=inventory | user=inventory |
password=p@ssw0rd/Inv3nt0ry | password=p@ssw0rd/Inv3nt0ry |
no-deploy | no-task=ESX,Collect,WakeOnLan,NetDiscovery,Deploy,NetInventory |
no-ocsdeploy | |
no-esx | |
no-printer | |
</code> | </code> |
| |
* On vérifie ensuite que l'agent fonctionne en le lançant une première fois à la main | ===== Premier inventaire manuel ===== |
<code bash> | <code bash> |
/usr/local/bin/fusioninventory-agent --debug | /usr/local/bin/fusioninventory-agent --debug |
</code> | </code> |
| |
* Il ne reste qu'à le configurer pour démarrer le démon | ===== Script de démarrage ===== |
<code bash> | <code bash> |
cat << EOF > /usr/local/etc/rc.d/fusioninventory-agent.sh | cat << EOF > /usr/local/etc/rc.d/fusioninventory-agent.sh |
/bin/mkdir -p /var/run/fusioninventory | /bin/mkdir -p /var/run/fusioninventory |
echo "Starting FusionInventory Agent"... | echo "Starting FusionInventory Agent"... |
/usr/local/bin/fusioninventory-agent --logfile=/var/log/fusioninventory/agent.log --logfile-maxsize=1 --daemon | cd /usr/local/share/fusioninventory/lib |
| /usr/local/bin/fusioninventory-agent --conf-file /usr/local/etc/fusioninventory/agent.cfg --logfile=/var/log/fusioninventory/agent.log --logfile-maxsize=1 --daemon |
| |
} | } |
rc_stop() { | rc_stop() { |
echo "Stopping FusionInventory Agent" | echo "Stopping FusionInventory Agent" |
kill -9 `pgrep -f fusioninventory-agent` | kill -9 \`pgrep -f fusioninventory-agent\` |
| |
} | } |
EOF | EOF |
chmod 755 /usr/local/etc/rc.d/fusioninventory-agent.sh | chmod 755 /usr/local/etc/rc.d/fusioninventory-agent.sh |
| /usr/local/etc/rc.d/fusioninventory-agent.sh start |
</code> | </code> |