Categories
Uncategorized

Install OCS Inventory Agent on CentOS 7

  1. Install EPEL Repo on CentOS 7
    cd /tmp
    wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    yum install -y epel-release-latest-7.noarch.rpm
    yum --disablerepo="*" --enablerepo="epel" install ocsinventory-agent -y
  2. Install Basic packages for agent
    yum install perl-XML-Simple perl-Net-IP
  3. Download latest agent rpm package
    wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/o/ocsinventory-agent-2.6.0-3.2.el7.x86_64.rpm
  4. Install package
    yum install ocsinventory-agent-2.6.0-3.2.el7.x86_64.rpm
  5. Open the configuration file.
    vi /etc/ocsinventory/ocsinventory-agent.cfg
  6. Uncomment the following lines. Set a tag for the current server and the address of your OCS server.
    server = http://your.ocs.server/ocsinventory
    tag = your_tag
  7. Restart agent
    service ocsinventory-agent restart
  8. To force the sending of inventory execute the following
    /usr/sbin/ocsinventory-agent
  9. How to check if ocsinventory-agent is installed or not
    rpm -qa | grep ocsinventory-agent