For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Agent setup

Setting Up OCS Inventory Agent on Linux

1

Download and extract the agent

Navigate to the OCS Inventory Agent release page and download the agent package.

Extract the downloaded package:

tar -xzf OCSInventory-Agent-Rework-Linux.tar.gz
cd OCSInventory-Agent-Rework/setup/linux/
2

Install the agent

Run the installation script in non-interactive mode: Replace <server-ip>, <username>, <password>, and <certificate-path> with your actual values:

sudo sh install.sh -l http://<server-ip>:<port> -u <username> -p <password> -m 2 -v 3 -s -n -c <certificate-path>

Example output:

❯ sudo sh install.sh -l http://127.0.0.1:8000 -u testuser -p testpassword -m 2 -v 3 -s -n -c myserver.pem

+----------------------------------------------------------+
|                                                          |
|  Welcome to OCS Inventory NG Agent in silent mode... !   |
|                                                          |
+----------------------------------------------------------+

Log level is set to 3
Inventory mode is set to 2
Running the agent now...
Creating ocsinventory-agent service file...
Reloading daemon and enabling service
Created symlink /etc/systemd/system/multi-user.target.wants/ocsinventory-agent.service → /etc/systemd/system/ocsinventory-agent.service.
Service Started

+------------------------------------------------------------------------------+
|   OK, OCS Inventory NG Agent for Unix/Linux has been successfully            |
|                    installed and configured.                                 |
|                                                                              |
|   Configuration files are located in /etc/ocsinventory-agent                 |
|   Log file is located in /var/log/ocsinventory-agent/ocsinventory-agent.log  |
|   Store Data Path is located in /var/lib/ocsinventory-data                   |
|   Agent Installation Directory is located in /usr/share/ocsinventory-agent   |
|                                                                              |
|                                                                              |
|   Enjoy OCS Inventory NG Agent ;-)                                           |
+------------------------------------------------------------------------------+

Ensure the user account used for the agent has the following permissions for Inventory - Assets on the OCS Inventory server:

  • Add

  • Update

  • View

For User and Groups configuration, refer to Configuration basics.

3

Verify the installation

Check the logs:

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

Ensure the agent is running as a service:

sudo systemctl status ocsinventory-agent

Running the agent manually

To manually run the agent for troubleshooting or testing:

sudo /usr/bin/ocsinventory-agent-ng -v 3

For advanced setups and configuration, please check our Agent Setup section.

Last updated