Upgrading the Wazuh agent from 2.x to 3.x

The following steps show how to upgrade the Wazuh agent from 2.x to 3.x.

Upgrading the Wazuh agent

To upgrade the Wazuh agent choose the appropriate tab for the desired operating system:

Add the new repository for Wazuh 3.x:

# cat > /etc/yum.repos.d/wazuh.repo <<\EOF
[wazuh_repo]
gpgcheck=1
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
name=Wazuh repository
baseurl=https://packages.wazuh.com/4.x/yum/
protect=1
EOF

Upgrade the Wazuh agent:

# yum install wazuh-agent

It is recommended to disable the Wazuh repository in order to avoid undesired upgrades and compatibility issues as the Wazuh agent should always be in the same or lower version than the Wazuh manager:

# sed -i "s/^enabled=1/enabled=0/" /etc/yum.repos.d/wazuh.repo