Ubuntu & Zabbix

timedatectl set-timezone Asia/Hong_Kong

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu24.04_all.deb
dpkg -i zabbix-release_latest+ubuntu24.04_all.deb
apt update

apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent mysql-server

/usr/bin/mysql_secure_installation

#mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root -p mysql

mysql -u root -p
mysql> alter user 'root'@'localhost' identified with 'mysql_native_password' by 'password';
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

mysql -u root -p
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;

vi /etc/zabbix/zabbix_server.conf
DBPassword=password

a2enmod ssl
a2ensite default-ssl

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

https://xxx.xxx.xxx.xxx/zabbix
Admin
zabbix

建立PSK加密Code
openssl rand -hex 32

Reference
https://www.zabbix.com/download?zabbix=7.0&os_distribution=ubuntu&os_version=24.04&components=server_frontend_agent&db=mysql&ws=apache

Comments

No comments yet. Why don’t you start the discussion?

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

*