当前位置:   article > 正文

Ubuntu 22.04 安装 zabbix_ubuntu22.04安装zabbix

ubuntu22.04安装zabbix

1,Install Zabbix repository

# wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb
# dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb
# apt update
  • 1
  • 2
  • 3

2,安装Zabbix server,Web前端,agent

# apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
  • 1

3,安装mysql数据库

apt install mysql-server -y
  • 1

3.1 创建初始数据库

# 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> set global log_bin_trust_function_creators = 1;
mysql> quit;
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

3.2 导入初始架构和数据,系统将提示您输入新创建的密码。

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

  • 1
  • 2

3.3 在导入数据库架构后,禁用log_bin_trust_function_creators选项。

# mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
  • 1
  • 2
  • 3
  • 4

3.4 为Zabbix server配置数据库

vim /etc/zabbix/zabbix_server.conf
  • 1
DBPassword=password
  • 1

3.5 为Zabbix前端配置PHP

vim /etc/zabbix/nginx.conf uncomment and set 'listen' and 'server_name' directives
  • 1
listen 8080;
server_name 域名或者IP地址;
  • 1
  • 2

3.6 启动Zabbix server和agent进程

systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm
systemctl enable zabbix-server zabbix-agent nginx php8.1-fpm
  • 1
  • 2

4,web访问8080端口

参考

  1. 下载安装Zabbix
  2. Zabbix 使用手册
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/881721
推荐阅读
相关标签
  

闽ICP备14008679号