Centos Stream 9 enable wazuh-agent

2,064 views
Skip to first unread message

Natassia M Stelmaszek

unread,
Feb 10, 2023, 4:13:03 PM2/10/23
to Wazuh mailing list
I'm unable to enable wazuh-agent on a CentOS Stream 9 system.  The agent will run if I start it manually but when I try to enable it so that it will start automatically, I get the following:

~$sudo systemctl enable wazuh-agent

Synchronizing state of wazuh-agent.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable wazuh-agent
Failed to execute /usr/lib/systemd/systemd-sysv-install: No such file or directory

On my Centos 8 and Rocky Linux installations the file systemd-sysv-install is a link to /usr/sbin/chkconfig.   Based on the dates, it looks like those were part of the initial Linux installations.  Neither the link nor the chkconfig file exist on the Centos 9 system.

How do I proceed to get wazuh-agent enabled?

Natassia

Nicolas Osvaldo Fernandez

unread,
Feb 10, 2023, 6:45:01 PM2/10/23
to Wazuh mailing list
Hello, nice to greet you.

I have set up an environment with the characteristics that you mention and I had the same error. I was able to solve it in the following way.

Try running the following command, in case it is not installed and it gives you the option to install, install it:

chkconfig --add wazuh-agent

Then try enabling and starting the agent:

systemctl daemon-reload
systemctl enable wazuh-agent
systemctl start wazuh-agent


Let me know if you were able to make it.

Documentation: https://documentation.wazuh.com/current/installation-guide/wazuh-agent/wazuh-agent-package-linux.html

Greetings

Nicolas

Jure Sah

unread,
Sep 5, 2023, 11:15:19 AM9/5/23
to Wazuh | Mailing List
This is because the wazuh-agent is missing a dependency on chkconfig which is not installed on CentOS 9 by default.

Opened a bug on this topic:

LP,
Jure

sobota, 11. februar 2023 ob 00:45:01 UTC+1 je oseba Nicolas Osvaldo Fernandez napisala:
Reply all
Reply to author
Forward
0 new messages