OCS agent installation on CentOS/OEL/RHEL/Ubuntu

Spread the love

 

Install these modules first :-
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

want rpn key

 

RHEL 5 or latest

Note: First RHEL upgrade with OEL repo

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 http://oss.oracle.com/ol6/RPM-GPG-KEY-oracle
rpm –import http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
# 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

# vi /etc/sysconfig/rhn/up2date

sslCACert=/usr/share/rhn/RHNS-CA-CERT

In this line change RHNS-CA-CERT to ULN-CA-CERT

Should look like

sslCACert=/usr/share/rhn/ULN-CA-CERT

Now run
# yum info

Should work fine
……………………………………………………………………………………………………………….

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
Note : If get error failed to installed XML::Simple module for install. Do it using CPAN

# cpan
cpan > force install XML::Simple
cpan> q

After installing all this do configuration setting’s for agent :
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.126)

http://localhost/ocsinventory

 

Note : Put this URL address

Do you need credential for the server?
Type y
user > admin
Password > Password

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 :

Y

Now it installed and inventory will be send to server.

Leave a Reply

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