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

MacOS installation

Installation

Download the archive from the release page's asset available here : https://github.com/OCSInventory-NG/OCSInventory-Agent-Rework/releases

You can also download from a terminal using curl (replace <VERSION> with the target version):

export VERSION="3.0.0-rc1" # Example for 3.0.0-rc1

curl -fsSL -o "OCSInventory-Agent-Setup-${VERSION}.tar.xz" \
"https://github.com/OCSInventory-NG/OCSInventory-Agent-Rework/releases/download/${VERSION}/OCSInventory-Agent-Setup-Macos-${VERSION}.tar.xz"

Then, extract the archive :

tar -xJf OCSInventory-Agent-Setup-Macos-<version>.tar.xz

The archive contains:

  • install.sh: installer script

  • uninstall.sh: uninstaller script

  • com.ocsinventory.agent.plist: LaunchDaemon definition (must stay next to install.sh)

  • ocsinventory-cli: agent binary

  • README

Run the installer as root, registering the LaunchDaemon and triggering an immediate run:

sudo ./install.sh \
  --url http://server_ip:port \
  --username username \
  --password password \
  --service \
  --now

See Silent installationbelow for silent deployment.

Available options:

Option
Description

-S, --silent

Silent mode (requires --url, --username, --password)

-U, --url URL

OCS server URL

-u, --username USERNAME

Username

-p, --password PASSWORD

Password

-m, --mode MODE

Inventory mode (default: 1)

-d, --data-path PATH

Data directory (default: /var/lib/ocsinventory-data)

-l, --log-level LEVEL

Log level 0–4 (default: 3)

--log-file

Enable log file (default: true)

--log-file-path PATH

Log file path (default: /var/log/ocsinventory-agent.log)

-c, --certificate FILE

PEM certificate path (default: none)

-b, --bypass-certificate

Bypass certificate validation (default: false)

-s, --service

Register the LaunchDaemon

-n, --now

Run the agent once immediately after install

-h, --help

Show help and exit

Silent installation

The agent can be installed and configured without any prompt, for mass deployment. Run install.sh with --silent from a directory that also contains the ocsinventory-cli binary, com.ocsinventory.agent.plist and uninstall.sh:

The binary is installed to /usr/local/bin/ocsinventory-cli and the configuration to /etc/ocsinventory-agent/config.json.

Post-install configuration

Re-run the installer in silent mode to change settings without reinstalling from scratch:

Verification

Files:

  • ocsinventory-cli (agent binary, location set at install time)

  • /Library/LaunchDaemons/com.ocsinventory.agent.plist (LaunchDaemon definition)

  • /var/lib/ocsinventory-data/ (data directory, default)

  • /var/log/ocsinventory-agent.log (log file, default)

Check the LaunchDaemon is loaded:

Run the agent manually:

  • Local modes (3/4): check for a new inventory file in the data directory.

  • Remote modes (1/2): confirm the asset appears/updates on the server.

Uninstall

Last updated