Frequently Asked Questions

« Previous
How do I create binary packages with MacPorts?
Next »
How do I set firewall rules in Linux to block SSH?

windows ubuntu macos xibo network zenworks android storage


72. How do I install the OCS Inventory agent for Linux?

See also: How do I use the UUPEL repository?

OCS Inventory is an open source inventory system for computer hardware and software.

The OCS Inventory server at BMC currently (2017-08-10) is running version 2.2 but the latest version is 2.3. So the client must be version 2.2 or lower.

Ubuntu 17.04

Ubuntu currently has the 2.0.5 version in their repositories which works fine but cannot check certificates.

  1. Install package

    apt-get install ocsinventory-agent

  2. Answer that the inventory should be generated over http.
  3. Enter the server name https://inv.bmc.uu.se/ocsinventory
  4. Fix configuration.

    cat <<EOF >>/etc/ocsinventory/ocsinventory-agent.cfg tag = BMC logger = Stderr logfile = /var/log/ocsinventory-client/ocsinventory-agent.log EOF

  5. Run the agent every hour instead of every day:

    mv /etc/cron.daily/ocsinventory-agent /etc/cron.hourly/.

  6. Test that everything is working.

    ocsinventory-agent cat /var/log/ocsinventory-client/ocsinventory-agent.log

  7. The computer should now show up at https://inv.bmc.uu.se/ocsreports/!

CentOS 6 (Scientific Linux 6 and RHEL 6)

CentOS has the 2.3 version in the EPEL repository which is to new. Install the older 2.1 version instead.

  1. Add the EPEL repo.

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

  2. Install the monitir-edid package.

    yum -y install http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/monitor-edid-2.1-1.el6.rf.x86_64.rpm

  3. Go to https://pkgs.org/download/ocsinventory-agent and download and install the version 2.1.1 of ocsinventory-agent and perl-Ocsinventory-Agent. This will add a lot of dependant packages.

    yum -y install http://rpms.famillecollet.com/enterprise/6/remi/x86_64//perl-Ocsinventory-Agent-2.1.1-1.el6.remi.noarch.rpm http://rpms.famillecollet.com/enterprise/6/remi/x86_64//ocsinventory-agent-2.1.1-1.el6.remi.x86_64.rpm

  4. Add the server to the configuration files at /etc/ocsinventory/ocsinventory-agent.cfg

    sed -i 's/^local = /###local = /' /etc/ocsinventory/ocsinventory-agent.cfg cat <<EOF >>/etc/ocsinventory/ocsinventory-agent.cfg server = https://inv.bmc.uu.se/ocsinventory ssl = 1 ca = /etc/ocsinventory/inv.bmc.uu.se.public.pem tag = BMC logger = Stderr logfile = /var/log/ocsinventory-agent/ocsinventory-agent.log EOF

  5. Download and put the public certificates from the webserver into the /etc/ocsinventory/inv.bmc.uu.se.cacert.pem file. This way the client is sure just to contact the OCS server.

    openssl s_client -showcerts -connect inv.bmc.uu.se:443 </dev/null 2>/dev/null | openssl x509 -outform PEM >/etc/ocsinventory/inv.bmc.uu.se.public.pem

  6. Activate the cronjob

    sed -i 's/=none/=cron/' /etc/sysconfig/ocsinventory-agent

  7. Test that everything is working.

    ocsinventory-agent cat /var/log/ocsinventory-agent/ocsinventory-agent.log

  8. The computer should now show up at https://inv.bmc.uu.se/ocsreports/!

CentOS 7 (Scientific Linux 7 and RHEL 7)

CentOS has the 2.3 version in the EPEL repository which is to new. Install the older 2.1 version instead. Certificate check seem to be broken, maybe due to missing perl package.

  1. Add the EPEL repo.

    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

  2. Go to https://pkgs.org/download/ocsinventory-agent and download and install the version 2.1.1 of ocsinventory-agent and perl-Ocsinventory-Agent. This will add a lot of dependant packages. Also add monitor-edid and libx86.

    yum -y install http://rpms.famillecollet.com/enterprise/7/remi/x86_64//perl-Ocsinventory-Agent-2.1.1-1.el7.remi.noarch.rpm http://rpms.famillecollet.com/enterprise/7/remi/x86_64//ocsinventory-agent-2.1.1-1.el7.remi.x86_64.rpm http://rpms.famillecollet.com/enterprise/7/remi/x86_64//monitor-edid-3.0-6.el7.remi.x86_64.rpm http://rpms.famillecollet.com/enterprise/6/remi/x86_64//libx86-1.1-9.el6.remi.x86_64.rpm perl-LWP-Protocol-https

  3. Add the server to the configuration files at /etc/ocsinventory/ocsinventory-agent.cfg. Something is not working with certificate validation.

    sed -i 's/^local = /###local = /' /etc/ocsinventory/ocsinventory-agent.cfg cat <<EOF >>/etc/ocsinventory/ocsinventory-agent.cfg server = https://inv.bmc.uu.se/ocsinventory ssl = 0 ### broken ca = /etc/ocsinventory/inv.bmc.uu.se.public.pem tag = BMC logger = Stderr logfile = /var/log/ocsinventory-agent/ocsinventory-agent.log EOF

  4. Download and put the public certificates from the webserver into the /etc/ocsinventory/inv.bmc.uu.se.cacert.pem file. This way the client is sure just to contact the OCS server.

    openssl s_client -showcerts -connect inv.bmc.uu.se:443 </dev/null 2>/dev/null | openssl x509 -outform PEM >/etc/ocsinventory/inv.bmc.uu.se.public.pem

  5. Activate the cronjob

    sed -i 's/=none/=cron/' /etc/sysconfig/ocsinventory-agent

  6. Test that everything is working.

    ocsinventory-agent cat /var/log/ocsinventory-agent/ocsinventory-agent.log

  7. The computer should now show up at https://inv.bmc.uu.se/ocsreports/!


 

This entry ocs.linux was last modified 2018-06-04

   

This documentation is covered by GNU Free Documentation License. 6 ms