Ubuntu 20.04
Sponsored Link

Zabbix 5.0 : Install2020/06/24

 
Install Zabbix 5.0 LTS which is an enterprise open source monitoring system.
It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others.
[1]
[2]
[3]
[4] Add Zabbix 5.0 repository and Install Zabbix server. To monitor Zabbix itself, Install Zabbix Agent, too.
root@dlp:~#
wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb

root@dlp:~#
dpkg -i zabbix-release_5.0-1+focal_all.deb

Selecting previously unselected package zabbix-release.
(Reading database ... 72691 files and directories currently installed.)
Preparing to unpack zabbix-release_5.0-1+focal_all.deb ...
Unpacking zabbix-release (1:5.0-1+focal) ...
Setting up zabbix-release (1:5.0-1+focal) ...

root@dlp:~#
apt update

root@dlp:~#
apt -y install zabbix-server-mysql zabbix-apache-conf zabbix-agent zabbix-frontend-php php-mysql php-gd php-bcmath php-net-socket php-pear

[5] Create a database for Zabbix.
root@dlp:~#
mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 55
Server version: 10.3.22-MariaDB-1ubuntu1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# create DB with utf8 charset
# with utf8mb4, error shows because of maximum index size 3072 bytes
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; 
Query OK, 1 row affected (0.00 sec)

# replace any password for DB [password]
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password'; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

root@dlp:~#
cd /usr/share/doc/zabbix-server-mysql

root@dlp:/usr/share/doc/zabbix-server-mysql#
gzip -d create.sql.gz

root@dlp:/usr/share/doc/zabbix-server-mysql#
mysql zabbix < create.sql

[6] Configure and start Zabbix Server.
root@dlp:~#
vi /etc/zabbix/zabbix_server.conf
# line 100: comfirm DB name

DBName=zabbix
# line 116: confirm DB username

DBUser=zabbix
# line 125: add DB user's password

DBPassword=password
root@dlp:~#
systemctl restart zabbix-server
[7] Configure and start Zabbix Agent to monitor Zabbix Server itself.
root@dlp:~#
vi /etc/zabbix/zabbix_agentd.conf
# line 171: change to own hostname

Hostname=
dlp.srv.world
root@dlp:~#
systemctl restart zabbix-agent
[8] Change access permission for Zabbix Web frontend if you need to limit accesses for it.
root@dlp:~#
vi /etc/apache2/conf-enabled/zabbix.conf
# line 10: change permission if you need

#
Allow from all
Allow from 10.0.0.0/24
# line 30: uncomment and change to your timezone

php_value date.timezone
Asia/Tokyo
root@dlp:~#
systemctl restart apache2
Matched Content