Installing the OCS Inventory Agent 1.x on CentOS/RHEL
Open Computer and Software Inventory (OCS-Inventory) - is a free software that enables users to inventory their IT assets.
OCS collects information about the hardware and software of networked machines running the OCS client program ("OCS Inventory Agent").
This guide describes how to install OCS-Inventory Client (ocsinventory-agent) Series 1.x on CentOS/RHEL.
Adding EPEL Repository
There is no OCS Inventory Agent package in the standard repositories, so we will take it from EPEL repository.
If you need, you can use the guide that describes the installation process of EPEL repository.
The example of EPEL installation on CentOS 6.4 - 64bit :
# rpm --import RPM-GPG-KEY-EPEL-6
# rm -f RPM-GPG-KEY-EPEL-6
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
# rm -f epel-release-6-8.noarch.rpm
Installing OCS Inventory Agent
Install the OCS Inventory Agent 1.x with the following command :
Configuring OCS Inventory Agent
Open the configuration file.
Uncomment the following lines. Set a tag for the current server and the address of your OCS server.
tag = your_tag
Change the line
Forcing the Inventory
By default, the 'ocsinventory-agent' script was added to 'cron.hourly' and it will send the inventory to your OCS server every hour.
I advice you to move the script to 'cron.daily', to send the inventory once a day. In most cases it will be enough.
To force the sending of inventory execute the following :
The problems I have encountered.
Packages perl-XML-Simple and perl-Net-IP not available
I had the following errors on RHEL 6.4 x86_64 system.
Error: Package: ocsinventory-agent-22.214.171.124-1.el6.noarch (epel) Requires: perl(XML::Simple) Error: Package: ocsinventory-agent-126.96.36.199-1.el6.noarch (epel) Requires: perl(Net::IP)
No package perl-XML-Simple available.
No package perl-Net-IP available.
It means that your system is not subscribed to the RHEL 'optional' channel.
You can manually subscribe your system or install the required packages from rpm.
# rpm -ivh ftp://rpmfind.net/linux/centos/6.4/os/x86_64/Packages/perl-Net-IP-1.25-13.el6.noarch.rpm
500 Can't connect to your.ocs.server:80 (connect: Connection timed out)
The following error in
Test the connection with
Trying your.ocs.server ...
telnet: connect to address your.ocs.server: Connection timed out
Check your firewall.