參考:https://www.zabbix.com/download
環境查看
配置源
# wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+bionic_all.deb # dpkg -i zabbix-release_5.0-1+bionic_all.deb # apt update
安裝zabbix server frontend agent
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
創建數據庫
# mysql -uroot -p password mysql> create database zabbix character set utf8 collate utf8_bin; mysql> create user zabbix@localhost identified by 'password'; mysql> grant all privileges on zabbix.* to zabbix@localhost; mysql> quit;
導入數據
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
設置數據庫密碼
/etc/zabbix/zabbix_server.conf
DBPassword=password
設置PHP時區
/etc/zabbix/apache.conf
# php_value date.timezone Asia/Shanghai
啟動應用
# systemctl restart zabbix-server zabbix-agent apache2 # systemctl enable zabbix-server zabbix-agent apache2
打開頁面配置
http://IP/zabbix
默認用戶名和密碼為Admin zabbix