Deployment variables for Linux
Pass the variables to the package manager command. Run the command as root, or put the variables after sudo, because sudo doesn't pass on your environment variables.
Debian-based endpoints:
# WAZUH_ENROLLMENT_TOKEN='<TOKEN>' WAZUH_AGENT_NAME='web-server-01' dpkg -i wazuh-agent_*.deb
Red Hat-based endpoints:
# WAZUH_ENROLLMENT_TOKEN='<TOKEN>' WAZUH_AGENT_NAME='web-server-01' rpm -ivh wazuh-agent-*.rpm
Then start the Wazuh agent:
# systemctl daemon-reload
# systemctl enable --now wazuh-agent