OCS Agent installation on linux servers

Spread the love

First , Install these modules :-

CentOS/OEL :

yum install -y perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-LWP perl-Digest-MD5 perl-Net-SSLeay

yum install -y perl-Crypt-SSLeay perl-Net-SNMP perl-Proc-Daemon perl-Proc-PID-File perl-Sys-Syslog pciutils smartmontools monitor-edid

RHEL 4 :

up2date install  perl-XML-Simple perl-Compress-Zlib perl-Net-IP perl-LWP perl-Digest-MD5 perl-Net-SSLeay

up2date install -y perl-Crypt-SSLeay perl-Net-SNMP perl-Proc-Daemon perl-Proc-PID-File perl-Sys-Syslog pciutils smartmontools monitor-edid

up2date –register

up2date up2date

rpm -qa | grep up2date

[

 Note: RHEL upgrade with  OEL repo . Run these commands 

Converting RHEL To OEL YUM

 cd /etc/yum.repos.d

wget  http://public-yum.oracle.com/public-yum-ol6.repo

 yum repolist

Might give an error Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

To resolve this use the following command

 rpm –import  https://oss.oracle.com/ol6/RPM-GPG-KEY-oracle

rpm –import /usr/share/rhn/RPM-GPG-KEY

 rpm -q gpg-pubkey-ec551f03-4c2d256a

After the updates are complete system might start throwing a CERT Error

rhn-plugin: ERROR: can not find ULN CA file: /usr/share/rhn/RHNS-CA-CERT

========================================================================

To resolve this, follow the below,

# cd /usr/share/rhn

You will find the cert ULN-CA-CERT

]

Ubuntu  :

apt-get install dmidecode nmap make

apt-get install libmodule-install-perl libmodule-build-perl libhttp-server-simple-psgi-perl libhttp-proxy-perl libio-captureoutput-perl libipc-run-perl libnet-snmp-perl libnet-telnet-cisco-perl libpoe-component-client-dns-perl libpoe-component-resolver-perl libtest-compile-perl libtest-deep-perl libtest-exception-perl libtest-most-perl libhttp-server-simple-authen-perl libio-capture-perl libio-captureoutput-perl libpoe-component-client-ping-perl libtest-http-server-simple-perl libtest-mockmodule-perl libtest-mockobject-perl libtest-nowarnings-perl libtest-failwarnings-perl libtest-warnings-perl libfile-copy-recursive-perl libxml-treepp-perl libproc-daemon-perl libproc-pid-file-perl

After installation modules need to download agent and configure it.

wget https://launchpad.net/ocsinventory-unix-agent/stable-2.1/2.1rc1/+download/Ocsinventory-Unix-Agent-2.1rc1.tar.gz

tar zxvf Ocsinventory-Unix-Agent-2.1rc1.tar.gz

cd Ocsinventory-Unix-Agent-2.1rc1

perl Makefile.PL

make

make install

……..

If get error failed to instlled XML::Simple module for install. Do it using CPAN

perl -MCPAN -e shell

You don’t have the perl-CPAN package installed. You can install it with yum install perl-CPAN

# cpan

cpan > force install XML::Simple

cpan > force install Proc::PID::File

cpan> q

Configuration setting’s :

Do you want to configure the agent

press y

Where do you want to write the configuration file?

press 2

Do you want to create the directory /etc/ocsinventory-agent?

press y

Should the old linux_agent settings be imported ?

Type n

What is the address of your ocs server?

Type server name or ip (192.168.1.1)

http://localhost/ocsinventory

Note : Put this URL address

Do you need credential for the server?

Type y

user > admin

Password > Passw0rd

Do you want to apply an administrative tag on this machine

Type n

Do yo want to install the cron task in /etc/cron.d

Type y

Do you want to create the /var/lib/ocsinventory-agent directory?

Type y

Should I remove the old linux_agent

Type n

Do you want to activate debug configuration option ?

Type y

Do you want to use OCS Inventory NG UNix Unified agent log file ?

Type n

Do you want disable SSL CA verification configuration option (not recommended) ?

Type n

Do you want to set CA certificate chain file path ?

Type n

Do you want to use OCS-Inventory software deployment feature?

Type n

Do you want to use OCS-Inventory SNMP scans feature?

Type n

Do you want to send an inventory of this machine?

Type y

Now you can check on OCS Inventory server .Link mention below :

http://localhost/ocsreports/index.php

Username   :  admin

Password    :  admin

Leave a Reply

Your email address will not be published. Required fields are marked *