Installing Zabbix
460 530 625
The installation instructions given here a valid for Zabbix 5.08, running on Debian 11 with MySQL 5.7.41. You can find installation instructions for other platforms on the Download and install Zabbix page.
# mysql -uroot -p existing-root-password-for-mysql mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin; mysql> create user zabbix@localhost identified by 'new-zabbix-database-user-password'; mysql> grant all privileges on zabbix.* to zabbix@localhost; mysql> set global log_bin_trust_function_creators = 1; mysql> flush privileges; mysql> quit;
# nano /etc/zabbix/zabbix_server.conf
Add the following information to the file:
zabbix zabbix DBPassword=new-zabbix-database-user-password
# cd /usr/share/zabbix-server-mysql # zcat schema.sql.gz images.sql.gz data.sql.gz | mysql -p zabbix Enter password:existing-root-password-for-mysql
Enable the service at startup and restart it.
# systemctl enable zabbix-server # systemctl restart zabbix-server
Enable Apache configuration and reload the webserver.
# a2enconf zabbix-frontend-php # service apache2 reload
Zabbix front end is at address https://your.server.addr/zabbix.
Create configuration file filling in the fields. Download file zabbix.conf.php and save it to Zabbix directory /etc/zabbix/. In the same directory there is already a file called zabbix_server.conf. Do not edit this file.
Restart Zabbix with command
# systemctl restart zabbix-server
you can find Zabbix log file zabbix_server.log in /var/log/zabbix-server. You can monitor the log with
# cd /var/log/zabbix-server # tail -f zabbix_server.log 3741187:20230411:212917.295 server #28 started [alerter #2] 3741188:20230411:212917.296 server #29 started [alerter #3] 3741193:20230411:212917.302 server #30 started [preprocessing manager #1] 3741198:20230411:212917.302 server #35 started [lld worker #1] 3741197:20230411:212917.303 server #34 started [lld manager #1] 3741199:20230411:212917.303 server #36 started [lld worker #2] 3741200:20230411:212917.304 server #37 started [alert syncer #1] 3741195:20230411:212917.402 server #32 started [preprocessing worker #2] 3741196:20230411:212917.402 server #33 started [preprocessing worker #3] 3741194:20230411:212917.403 server #31 started [preprocessing worker #1]
Quit the command by pressing ctrl-C.
Go to Zabbix dashboard at https://your.server.addr/zabbix.
# apt install zabbix-agent