Zabbix 6.0(pre-release)版をutuntu 20.04にインストールしてみましたので備忘録も兼ねて。
1. 環境
OS: Ubuntu 20.04.3 LTS
Kernel: 5.4.0-99-generic
2. zabbix インストール
リポジトリインストール
wget https://repo.zabbix.com/zabbix/5.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.5-1+ubuntu20.04_all.deb
dpkg -i zabbix-release_5.5-1+ubuntu20.04_all.deb
apt update
MySQLサーバをインストールします。
apt install mysql-server
Zabbixサーバおよびその他関連パッケージをインストールします。
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
DB設定を実施します。
mysql -uroot -p
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> quit;
準備されているSQLを実行します。
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
# DBおよびテーブルの確認
mysql -uroot -p
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| zabbix |
+--------------------+
5 rows in set (0.00 sec)
mysql> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| auditlog |
| autoreg_host |
| conditions |
| config |
| config_autoreg_tls |
| corr_condition |
| corr_condition_group |
| corr_condition_tag |
| corr_condition_tagpair |
| corr_condition_tagvalue |
| corr_operation |
| correlation |
| dashboard |
| dashboard_page |
| dashboard_user |
| dashboard_usrgrp |
| dbversion |
| dchecks |
| dhosts |
| drules |
| dservices |
| escalations |
| event_recovery |
| event_suppress |
| event_tag |
| events |
| expressions |
| functions |
| globalmacro |
| globalvars |
| graph_discovery |
| graph_theme |
| graphs |
| graphs_items |
| group_discovery |
| group_prototype |
| ha_node |
| history |
| history_log |
| history_str |
| history_text |
| history_uint |
| host_discovery |
| host_inventory |
| host_tag |
| hostmacro |
| hosts |
| hosts_groups |
| hosts_templates |
| housekeeper |
| hstgrp |
| httpstep |
| httpstep_field |
| httpstepitem |
| httptest |
| httptest_field |
| httptest_tag |
| httptestitem |
| icon_map |
| icon_mapping |
| ids |
| images |
| interface |
| interface_discovery |
| interface_snmp |
| item_condition |
| item_discovery |
| item_parameter |
| item_preproc |
| item_rtdata |
| item_tag |
| items |
| lld_macro_path |
| lld_override |
| lld_override_condition |
| lld_override_opdiscover |
| lld_override_operation |
| lld_override_ophistory |
| lld_override_opinventory |
| lld_override_opperiod |
| lld_override_opseverity |
| lld_override_opstatus |
| lld_override_optag |
| lld_override_optemplate |
| lld_override_optrends |
| maintenance_tag |
| maintenances |
| maintenances_groups |
| maintenances_hosts |
| maintenances_windows |
| media |
| media_type |
| media_type_message |
| media_type_param |
| module |
| opcommand |
| opcommand_grp |
| opcommand_hst |
| opconditions |
| operations |
| opgroup |
| opinventory |
| opmessage |
| opmessage_grp |
| opmessage_usr |
| optemplate |
| problem |
| problem_tag |
| profiles |
| proxy_autoreg_host |
| proxy_dhistory |
| proxy_history |
| regexps |
| report |
| report_param |
| report_user |
| report_usrgrp |
| rights |
| role |
| role_rule |
| script_param |
| scripts |
| service_alarms |
| service_problem |
| service_problem_tag |
| service_status_rule |
| service_tag |
| services |
| services_links |
| sessions |
| sla |
| sla_excluded_downtime |
| sla_schedule |
| sla_service_tag |
| sysmap_element_trigger |
| sysmap_element_url |
| sysmap_shape |
| sysmap_url |
| sysmap_user |
| sysmap_usrgrp |
| sysmaps |
| sysmaps_element_tag |
| sysmaps_elements |
| sysmaps_link_triggers |
| sysmaps_links |
| tag_filter |
| task |
| task_acknowledge |
| task_check_now |
| task_close_problem |
| task_data |
| task_remote_command |
| task_remote_command_result |
| task_result |
| timeperiods |
| token |
| trends |
| trends_uint |
| trigger_depends |
| trigger_discovery |
| trigger_queue |
| trigger_tag |
| triggers |
| users |
| users_groups |
| usrgrp |
| valuemap |
| valuemap_mapping |
| widget |
| widget_field |
+----------------------------+
173 rows in set (0.01 sec) #DBもテーブルも作成されています。
mysql>quit
Configファイルを変更しましょう。
vim /etc/zabbix/zabbix_server.conf
DBPassword=password
サービスリスタートします。
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
3. GUI操作
URLにアクセスします。
http://IPAddress/zabbix
DBのパスワードを入力して「Next step」をクリックします。
サーバ名の入力とTimeZoneを選択して、「Next step」をクリックします。