Procédure OCS Inventory Ubuntu

Le 22 Novembre 2023

Cette procédure décrit les étapes nécessaires pour installer et configurer GLPI et OCS Inventory sur un système Ubuntu.

1. Installer les dépendances

sudo apt install libcrypt-ssleay-perl libnet-snmp-perl libproc-pid-file-perl libproc-daemon-perl net-tools libsys-syslog-perl pciutils smartmontools read-edid nmap libnet-netmask-perl

2. Télécharger OCS Inventory Agent Unix sur le site officiel

3. Extraire de fichier téléchargé, puis se positioner à l’intérieur de celui-ci

sudo tar –xvzf Ocsinventory-Agent-2.x.y.tar.gz
cd Ocsinventory-Agent-2.x.y

4. Générer le fichier d’installation

sudo perl Makefile.PL

5. Lancer la compilation

sudo make
sudo make install

6. Remplir les champs demandés pour l’installation

Do you want to configure the agent
Please enter 'y' or 'n'?> [y] y
Where do you want to write the configuration file?
0 -> /etc/ocsinventory
1 -> /usr/local/etc/ocsinventory
2 -> /etc/ocsinventory-agent
?> 0
Do you want to create the directory /etc/ocsinventory-agent?
Please enter 'y' or 'n'?> [y] y
Should the old unix_agent settings be imported ?
Please enter 'y' or 'n'?> [y] y
[info] The config file will be written in /etc/ocsinventory-agent/ocsinventory-agent.cfg,
What is the address of your ocs server?> 10.10.0.213
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n] [entrée]
Do you want to apply an administrative tag on this machine
Please enter 'y' or 'n'?> [y] [entrée]
tag?> Ubuntu
Do yo want to install the cron task in /etc/cron.d
Please enter 'y' or 'n'?> [y] [entrée]
Where do you want the agent to store its files? (You probably don't need to change it)?>
[/var/lib/ocsinventory-agent] [entrée]
Should I remove the old unix_agent
Please enter 'y' or 'n'?> [n] [entrée]
Do you want to activate debug configuration option ?
Please enter 'y' or 'n'?> [y] n
Do you want to use OCS Inventory NG UNix Unified agent log file ?
Please enter 'y' or 'n'?> [y] [entrée]
Specify log file path you want to use?> /var/log/ocs_agent.log
Do you want disable SSL CA verification configuration option (not recommended) ?
Please enter 'y' or 'n'?> [n] [entrée]
Do you want to set CA certificate chain file path ?
Please enter 'y' or 'n'?> [y] n
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y] [entrée]
Do you want to use OCS-Inventory SNMP scans feature?
Please enter 'y' or 'n'?> [y] [entrée]
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y] [entrée]

7. Une fois la configuration terminée, le nouvel ordinateur devrait apparaitre dans l’interface de gestion OCSInventory

OCSInventory Interface