Install Wazuh agent with DEB packages
The DEB packages are suitable for Debian, Ubuntu, and other Debian-based systems.
All the commands described below need to be executed with root user privileges.
Adding the Wazuh repository
The first step to installing the Wazuh agent is to add the Wazuh repository to your server. Alternatively, if you prefer to download the wazuh-agent package directly, you can find it here.
- To perform this procedure, the
lsb-releasepackages must be installed on your system. If they are not already present, install them using the commands below:
# apt-get install curl apt-transport-https lsb-release
- Install the Wazuh repository GPG key:
# curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add -
- Add the repository:
# echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list
- Update the package information:
# apt-get update
Installing Wazuh agent
- On your terminal, install the Wazuh agent. You can choose only installation or an installation with a registration / configuration included:
- Only installation:# apt-get install wazuh-agent
Now that the agent is installed, the next step is to register and configure it to communicate with the manager. For more information about this process, please visit the user manual.
- Installation with a registration / configuration included:
You can automate the agent registration and configuration using variables.# WAZUH_MANAGER_IP="192.168.1.2" apt-get install wazuh-agent
See the following document for additional automated deployment options: automated deployment variables.
- (Optional) Disable the Wazuh updates:
It is recommended that the Wazuh repository be disabled in order to prevent accidental upgrades. To do this, use the following command:# sed -i "s/^deb/#deb/" /etc/apt/sources.list.d/wazuh.list # apt-get update
Alternately, you can set the package state to
hold, which will stop updates (although you can still upgrade it manually using
apt-get install).# echo "wazuh-agent hold" | sudo dpkg --set-selections