How to Update Zabbix Agent on Ubuntu

On the test, I will update the Zabbix Agent on different versions of the Ubuntu operating systems.

First of all, update the Zabbix server so that it is not older than the Zabbix agent, for example, as I described in this article:
Upgrading Zabbix 3.2 to 4.2 on Ubuntu

Check the version of Zabbix agent:

zabbix_agentd -V

Suppose I have installed Zabbix agent 3.2, and on the official website there is version 4.2.
So delete the source with the old version:

sudo rm -Rf /etc/apt/sources.list.d/zabbix.list

And add with a new one, for example for Ubuntu 14.04 (Trusty):

sudo wget
sudo dpkg -i zabbix-release_4.2-2+trusty_all.deb
sudo apt update

Or for Ubuntu 16.04 (Xenial):

sudo wget
sudo dpkg -i zabbix-release_4.2-2+xenial_all.deb
sudo apt update 

Or for Ubuntu 18.04 (Bionic):

sudo wget
sudo dpkg -i zabbix-release_4.2-2+bionic_all.deb
sudo apt update

And perform the update:

sudo apt-get install --only-upgrade zabbix-agent

Done, even version 2.0 should be updated in the same way.
Make sure that the Zabbix agent starts after the system restarts:

sudo systemctl is-enabled zabbix-agent
sudo systemctl enable zabbix-agent
sudo systemctl restart zabbix-agent

Leave a comment

Leave a Reply