Ubuntu 22.04
Sponsored Link

Zabbix 6.0 : Install2022/08/11

 
Install Zabbix 6.0 LTS which is an enterprise open source monitoring system.
[1]
[2]
Configure SSL/TLS setting, refer to here. (not required but recommended)
[3]
[4]
[5] Add Zabbix 6.0 repository and Install Zabbix server. To monitor Zabbix itself, Install Zabbix Agent, too.
root@dlp:~#
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-3+ubuntu22.04_all.deb

root@dlp:~#
dpkg -i zabbix-release_6.0-3+ubuntu22.04_all.deb

Selecting previously unselected package zabbix-release.
(Reading database ... 75317 files and directories currently installed.)
Preparing to unpack zabbix-release_6.0-3+ubuntu22.04_all.deb ...
Unpacking zabbix-release (1:6.0-3+ubuntu22.04) ...
Setting up zabbix-release (1:6.0-3+ubuntu22.04) ...

root@dlp:~#
apt update

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

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

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 37
Server version: 10.6.7-MariaDB-2ubuntu1.1 Ubuntu 22.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.

MariaDB [(none)]> create database zabbix character set utf8mb4 collate utf8mb4_bin; 
Query OK, 1 row affected (0.00 sec)

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

MariaDB [(none)]> exit
Bye

root@dlp:~#
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

Enter password:  
# the password you set above for [zabbix] user
[7] Configure and start Zabbix Server.
root@dlp:~#
vi /etc/zabbix/zabbix_server.conf
# line 105 : confirm DB name

DBName=zabbix
# line 121 : confirm DB username

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

DBPassword=password
root@dlp:~#
systemctl restart zabbix-server

root@dlp:~#
systemctl enable zabbix-server
[8] Configure and start Zabbix Agent to monitor Zabbix Server itself.
root@dlp:~#
vi /etc/zabbix/zabbix_agent2.conf
# line 80 : specify Zabbix server

Server=127.0.0.1
# line 132 : specify Zabbix server

ServerActive=127.0.0.1
# line 143 : change to your hostname

Hostname=
dlp.srv.world
root@dlp:~#
systemctl restart zabbix-agent2
[9] Change PHP values for Zabbix requirements.
root@dlp:~#
vi /etc/php/8.1/fpm/pool.d/www.conf
;; add to the end

php_value[max_execution_time] = 300
php_value[memory_limit] = 128M
php_value[post_max_size] = 16M
php_value[upload_max_filesize] = 2M
php_value[max_input_time] = 300
php_value[max_input_vars] = 10000
php_value[always_populate_raw_post_data] = -1
php_value[date.timezone] = Asia/Tokyo

root@dlp:~#
vi /etc/apache2/conf-enabled/zabbix.conf
# line 10 : change access permission if you need

#
Allow from all
Allow from 10.0.0.0/24
root@dlp:~#
systemctl restart apache2 php8.1-fpm
Matched Content