Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Issue with installing Linux agent

Hi,

I'm having an odd issue with installing the Linux agent/ For some reason,it's complaining that I cannot find the agent in the PATH

[root@vdraddevl904 Ocsinventory-Unix-Agent-2.10.2]# make install

Manifying 1 pod document

Manifying 6 pod documents

Appending installation info to /opt/scmtech-perl/lib/5.40.1/x86_64-linux/perllocal.pod

[ ! -f run-postinst ] || /opt/scmtech-perl/bin/perl postinst.pl

Do you want to configure the agent?

Please enter 'y' or 'n'?> [y] 

Where do you want to write the configuration file?

 0 -> /etc/ocsinventory

 1 -> /usr/local/etc/ocsinventory

 2 -> /etc/ocsinventory-agent

?>  0

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

Please enter 'y' or 'n'?> [y] 

Should the old unix_agent settings be imported?

Please enter 'y' or 'n'?> [y] 

[info] The config file will be written in /etc/ocsinventory/ocsinventory-agent.cfg,

What is the address of your ocs server?>  http://datatestradls01/ocsinventory

Do you need credential for the server? (You probably don't)

Please enter 'y' or 'n'?> [n] 

Do you want to apply an administrative tag on this machine?

Please enter 'y' or 'n'?> [y] n

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

Please enter 'y' or 'n'?> [y] 

Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/lib/ocsinventory-agent] 

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

Please enter 'y' or 'n'?> [y] 

Should I remove the old unix_agent?

Please enter 'y' or 'n'?> [n] 

Do you want to activate debug configuration option?

Please enter 'y' or 'n'?> [y] 

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

Please enter 'y' or 'n'?> [y] 

Specify log file path you want to use?>  /var/log/

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

Please enter 'y' or 'n'?> [n] y

Do you want to set CA certificates file path?

Please enter 'y' or 'n'?> [y] n

Do you want disable software inventory?

Please enter 'y' or 'n'?> [n] 

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

Please enter 'y' or 'n'?> [y] n

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

Please enter 'y' or 'n'?> [y] 

Do you want to send an inventory of this machine?

Please enter 'y' or 'n'?> [y] 

Setting OCS Inventory NG server address...

Looking for OCS Invetory NG Unix Unified agent installation...

sorry, can't find ocsinventory-agent in $PATH

make: *** [Makefile:1336: install] Error 1

[root@vdraddevl904

But I'm trying to compile and install the agent itself. How do I make this installation work? 

in OCS Inventory NG server for Unix by (350 points)

6 Answers

0 votes
look at the logs but did you forget the requirements ? (mandatories lib, mandatories perl lib
by (640 points)
0 votes
Why do you want 'build' OCS agent ?

There is no OCS agent in your repository ? Have you the knowledge to 'build' ?

It's not mandatory to have Agent and Server with the same level !! The only restriction is Server level need to be upper than Agent level ! And for standard distribution, there is a OCS agent package quite old: for Debian 12, OCS agent is 2.10.0 and you could install a Server in 2.12.3.

I suggest regulary you could upgrade your server and use standard OCS agent from distribution repository !
by (20.2k points)
0 votes
by (350 points)
0 votes
Few years ago, I tried all ways from OCS's wiki (even Unix packager) ... without real success. In the company, the server inventories nearly 8.000 hardware by day, and there is lot of different OS for this number of Agents !

Now I use the agent package from distribution repository, and I win lot of time.

I can't help you : good chance ...
by (20.2k points)
0 votes

Thanks. You mean to install following this instruction from Setting up the UNIX agent using repository on client computers - OCS Inventory Documentation

$ sudo wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
$ sudo wget https://rpm.ocsinventory-ng.org/ocsinventory-release-latest.el9.ocs.noarch.rpm

You can install the repo with "dnf"

$ sudo  dnf install ocsinventory-release-latest.el9.ocs.noarch.rpm epel-release-latest-9.noarch.rpm

To install the unix agent and requirement use this command:

$ sudo dnf install yum-utils
$ sudo yum-config-manager --enable crb
$ sudo dnf install ocsinventory-agent

On Fedora you can install the unix agent with RPM

You need to have "wget" to download the OCS's repo

$ export FEDORA_VERSION=$(awk '{print $3}' /etc/fedora-release)
$ sudo wget https://rpm.ocsinventory-ng.org/ocsinventory-release-latest.fc$FEDORA_VERSION.ocs.noarch.rpm
by (350 points)
0 votes

I think I get what you're saying. Now the next question is to scan and inventory a host. i follow the instructions and run this command from the ocs server

[root@ocsserver DBD-mysql-5.011]# /opt/scmtech-perl/bin/perl /usr/share/ocsinventory-reports/ocsreports/ipdiscover-util.pl -ip=10.18.26.50/255.255.255.0 -net=255.255.255.0 -a -xml -h=ocsserver-u=ocs -p=ocs -d=ocsweb

<IP>

  <DISCOVERED>yes</DISCOVERED>

  <DNS>myhost.com.</DNS>

  <INVENTORIED>no</INVENTORIED>

  <IP>10.18.26.50</IP>

  <NETBIOS></NETBIOS>

  <NETNAME>-</NETNAME>

  <NETNUM>10.18.26.0</NETNUM>

</IP>

How do I make this   <INVENTORIED>no</INVENTORIED> into   <INVENTORIED>yes</INVENTORIED>?  There is no log generated under /var/log/ocsinventory-server
by (350 points)
 
Powered by Question2Answer
...