The upgrade is quite simple in Ubuntu. As always, do not forget to backup your files.
Before proceeding with the upgrade, make sure to stop both zabbix server and zabbix agent service:
$ sudo service zabbix-server stop
$ sudo service zabbix-agent stop
If the installation was official Zabbix repo, then the following command will do the trick:
$ sudo yum upgrade ‘zabbix*’
OR
$ sudo apt install –only-upgrade ‘zabbix-server.*’