You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2015-11-20 14:28:36

mykolaoq
Member
Registered: 2015-11-19
Posts: 30

fusioninventory unix portable

Hello! i have some unix station in closed network, that i want to inventory. Can i use fusioninventory agent as portable in linux (+bsd)?

Offline

#2 2019-12-03 01:56:25

password
Member
Registered: 2019-09-12
Posts: 1

Re: fusioninventory unix portable

mykolaoq wrote:

Hello! i have some unix station in closed network, that i want to inventory. Can i use fusioninventory agent as portable in linux (+bsd)?

Today, I was looking for how to do this on system I manage and I did not find any information either. For reference, I am adding here how I managed to do it.

## requirements

You GLPI server must have the fusioninventory plugin installed. The XML that you will be generating be imported at Administration > Fusioninventory > Tasks > Import

In regards to dependencies, the fusion inventory report script (not the agent) relies on some perl modules that are not packaged with most unix operating systems by default or are included in the source code of fusion inventory. The following is not fully portable, but is distribution-dependent . For each OS version, download the packages on test machine of the same version and then recursively copy the libraries into the lib directory (so it looks something like lib/File/Which.pm) after extracting the fusioninventory code. In this a case, it is especially important to 'export PERL5LIB=.'.

## limitations

Across multiple operating system there are the following limitations:
- no network port data or IP addresses
- no volumes

## ubuntu 16.04.6

GLPI server version: 9.2
Fusion inventory version: 9.1 + 1.0
perl version: 5.22

Get the latest (2.5.1) '.deb' files from fusioninventory@github/releases . In particular:
- fusioninventory-agent_2.5.1-1_all.deb
- fusioninventory-agent-task-collect_2.5.1-1_all.deb

```
mkdir /root/fusion
cd /root/fusion
wget ...
mkdir tmp
dpkg-deb -x each.deb tmp
cd tmp/usr/share/fusioninventory/lib
apt install libfile-which-perl libuniversal-require-perl libxml-treepp-perl
perl /root/fusion/tmp/usr/bin/fusioninventory-inventory
```

Copy the results into a file. Trim any empty lines at start and end.


## ubuntu 18.04

perl version: 5.26

Exactly like ubuntu 16.04 but:

```
cd /root/fusion/tmp/usr/share/fusioninventory/lib
export PERL5LIB=.
```

## openbsd 6.5

perl version: 5.28

Not too great. For a virtual machine, it only got the memory and kernel information. Not even network information.

Much like ubuntu16 but:

```
mkdir /root/fusion
curl -Lo out.tgz FusionInventory-Agent-2.5.1.tar.gz
mkdir tmp
tar xzvf ... -C tmp
pkg_add p5-File-Which p5-Universal-require p5-XML-TreePP
cd tmp/FusionInventory.../lib
export PERL5LIB=.
perl /root/fusion/tmp/FusionInventory-Agent-2.5.1/bin/fusioninventory-inventory
```

### strange error

I get the following error on 6.5, which seems related to the BOOT_TIME variable:
`Odd number of elements in anonymous hash at FusionInventory/Agent/Task/Inventory/BSD.pm line 44.`


I like fishy software.

Offline

Board footer

Powered by FluxBB