Upgrading Wazuh agents on Linux endpoints

Select your package manager and follow the instructions to upgrade the Wazuh agent locally.

Note

You need root user privileges to run all the commands described below.

  1. Import the GPG key.

    # rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH
    
  2. Add the Wazuh repository.

    # cat > /etc/yum.repos.d/wazuh.repo << EOF
    [wazuh]
    gpgcheck=1
    gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
    enabled=1
    name=EL-\$releasever - Wazuh
    baseurl=https://packages.wazuh.com/4.x/yum/
    protect=1
    EOF
    
  3. Clean the YUM cache.

    # yum clean all
    
  4. Upgrade the Wazuh agent to the latest version.

    # yum upgrade wazuh-agent
    
  5. 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 an older version than the Wazuh manager.

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