Life of a Geek Admin

The Daily adventures of a true geek administrator

Life of a Geek Admin - The Daily adventures of a true geek administrator

Installing OCS Inventory Part 3 (Linux Agent)

Welcome to part 3 of the series on Installing OCS Inventory NG. In this part of the series we will cover installing the UNIX Agent on CentOS 6 (RHEL 6.0 based).

Note: OCS Inventory NG Agent for Linux can only be installed locally and cannot be deployed using package manager.

Now let’s get started and download the agent from here.

For Linux / Unix these are the required modules.

PERL 5.8

  • Perl module XML::Simple
  • Perl module Compress::Zlib
  • Perl module Net::IP
  • Perl module LWP::UserAgent
  • Perl module Digest::MD5
  • Perl Module Net::SSLeay
  • Perl Module Mac::SysProfile is need on MacOSX

dmidecode
lspci on Linux and *BSD (pciutils package)
Make utility
C/C++ compiler like GNU GCC

Optional modules:

  • Perl module Proc::Daemon
  • Perl module Proc::PID::File if Proc::Daemon is installed
  • Perl module Net::SNMP
  • Perl module Nmap::Parser
  • Perl module Module::Install
  • Perl module Net::CUPS
  • Perl module perl-cpan

Nmap (v3.90 or superior)

Now that we know what we need for the installation, let’s get started in getting them installed. As noted in OCS Inventory Ng Part 1 we need to have the EPEL repository installed. If you do not have it installed you can do so by following the following instructions.
Go to http://http://fedoraproject.org/wiki/EPEL and download and install the EPEL release based on your distribution release. In this example we are running 6.0 release, so EL6 is the chosen package. After installing you are ready to proceed.

Open a terminal session and run the following command to install the prerequisites.

$  sudo yum install perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-libwww-perl perl-Digest-HAMC perl-Digest-SHA1 perl-Net-SSLeay
perl-Crypt-SSLeay perl-Net-SNMP perl-Proc-Daemon perl-Proc-PID-File pciutils smartmontools monitor-edid

We will also need build utilities as well

$ sudo yum groupinstall "Development Tools" # This will ensure that you have all the required tools for the build.
$ sudo yum install ncurses-devel # This is required to enable a make *config command to execute correctly.
$ sudo yum install qt-devel # This is only necessary if you wish to use make xconfig instead of make gconfig or make menuconfig.

Any dependencies needed will be downloaded and installed. Now we are ready to install the agent.

Change to the directory where you downloaded the agent an un-tar it and change into the directory.

$ tar –xvf Ocsinventory-Unix-Agent-2.0.1.tar.gz
$ cd Ocsinventory-Unix-Agent-2.0.1

No lets build and install it using perl

$ perl Makefile.pl

$ make

$ sudo make install

A check for PERL interpreter binary, C/C++ compiler and make utility is made during installation. If one of these components is not found, setup will stop.

Setup will check for:

  • dmidecode binary.
  • Compress::Zlib PERL module
  • XML::Simple PERL module
  • Net::IP PERL module
  • LWP::UserAgent PERL module
  • Digest::MD5 PERL module
  • Net::SSLeay PERL module

If not found, it will ask you if you wish to install it. Enter “y” or validate to enable install of required component. If you enter “n”, setup will stop here.

Configuration begin. Choice to configure agent now or later.

Unixagent1

Select the path of configuration file directory

Unixagent2

Validation to create the directory, and definition of OCS Inventory NG server address (IP address or hoshtname.domain)

You will then have to choose between 3 methods for generating inventory:

  1. http: computer is connected to the network and is able to reach the Communication server with HTTP protocol. USED BY DEFAULT
  2. https: computer is connected to the network and is able to reach the Communication server with HTTPS protocol. You have to configure SSL on your OCS Server and copy the SSL certificate on the agent directory to use this method
  3. local: computer is not connected to the network and inventory will be generated in a file to manually send to OCS Inventory NG operator. This option must be set manually in ocsinventory-agent.conf like this :
 local=/tmp

For two others methods :

 Syntax : http[s]://ocsinventory-ng-server[:port]/ocsinventory

Exemples :

ocsserver.domains.local

https://w.x.y.z

ocsserver.domains.local:1234

https://ocsserver.domains.local

Unixagent3

Choice to use or not apache auth, and possibility to define an administrative tag

Unixagent4

Choice to create or not a cron task, definition and validation of agent files directory

Unixagent5

Choice to remove or not the old agent version

Unixagent6

Choice to use or not software deployment feature, SNMP scans feature and send an inventory

Unixagent7

If Accountinfo file doesn’t exist, it will be created, and the inventory will be sent to the server

Unixagent8

Now we have a Windows and a Linux agent installed and they have both reported inventory to the management server. Next part we start exploring the interface and some of the features of OCS Inventory NG.

Installing OCS Inventory NG Part 2

As we continue deploying OCS Inventory NG in our network we now must install the agents on our Windows and Linux systems. We at least need to get the agent installed on one Windows system to use the packaging system to deploy the packages. For this post we will just show how to install the agents. Let’s start with installation of a Windows agent.

Download the Windows agent from here and unzip the file. Once the file has been extracted, double-click on OCS-NG-Windows-Agent-Setup.exe to start the installation.

ocs_8

The installation wizard will start running, click next to move forward.

ocs_9

Click I Agree to agree to the license agreement.

ocs_10

Now we are at the choose components screen. We will leave the default selections that are selected for us and click next to continue.

ocs_11

Now we are prompted for the address or FQDN (Fully Quailified Domain Name) of the OCS Inventory NG Communication server. Enter in the correct value for your installation. This should look like http://your_OCS_server/ocsinventory. Leave the validate certificates box checked and click next.

ocs_12

Next we have choices for the agent itself. By default none of the boxes are checked. If this is good for you then, click next to continue on with the install. For our installation I have chosen to Do not register Systray applet and Immediately launch inventory boxes.

Next choose destination folder, “C:\Program Files\OCS Inventory Agent” by default (“C:\Program Files (x86)\OCS Inventory Agent” under Windows 64 bits), and click “Install” button.  The installation will progress and will bring up a Finish screen when complete. Click “Finish” button to close OCS inventory NG Agent Setup.

For verification that the system has logged in just open http://your_OCS_server/ocreports, click on the All Computers icon and the system should be in the table that is displayed.

ocs_13

Stay tuned for part 3 where we will cover installing the Linux agent.

Switch to our mobile site