【案例】22.03 LTS 安装zabbix 教程
2024-07-30案例库zabbix教程
22.03 LTS 安装zabbix 教程
openEuler 最小安装
关闭防火墙
text
systemctl stop firewalld
systemctl disable firewalld
MYSQL服务安装配置
安装mysql
textdnf install mysql mysql-server mysql-common mysql-libs mysql-devel mysql-selinux --nogpgcheck
启动mysql服务
textsystemctl enable mysqld systemctl start mysqld systemctl status mysqld
配置密码
mysqlmysql -uroot -p > password 回车 ALTER USER 'root'@'localhost' IDENTIFIED BY '密码';
安装ZABBIX服务
text
dnf config-manager --add-repo https://repo.oepkgs.net/openeuler/rpm/openEuler-22.03-LTS/contrib/others/aarch64/
dnf clean all && dnf makecache
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent --nogpgcheck
配置和启动zabbix进程
配置zabbix
mysqlmysql -uroot -p > password create database zabbix character set utf8mb4 collate utf8mb4_bin; create user zabbix@localhost identified by '密码'; grant all privileges on zabbix.* to zabbix@localhost; set global log_bin_trust_function_creators = 1; quit;
初始化架构和数据
textzcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Disable log_bin_trust_function_creators option after importing database schema.
mysqlmysql -uroot -p > password set global log_bin_trust_function_creators = 0; quit;
修改zabbix server配置数据库和PHP
textvi /etc/zabbix/zabbix_server.conf --- DBPassword=密码 --- vi /etc/nginx/conf.d/zabbix.conf --- listen 8080;#取消注释 server_name example.com;#取消注释 ---
升级net-snmp
textdnf install net-snmp net-snmp-devel net-snmp-utils --nogpgcheck
启动zabbix进程
textsystemctl restart zabbix-server zabbix-agent nginx php-fpm systemctl enable zabbix-server zabbix-agent nginx php-fpm
访问zabbix首页
默认端口是8080
【版权声明】Copyright © 2024 openEuler Community。本文由openEuler社区首发,欢迎遵照 CC-BY-SA 4.0 协议规定转载。转载时敬请在正文注明并保留原文链接和作者信息。
【免责声明】本文仅代表作者本人观点,与本网站无关。本网站对文中陈述、观点判断保持中立,不对所包含内容的准确性、可靠性或完整性提供任何明示或暗示的保证。本文仅供读者参考,由此产生的所有法律责任均由读者本人承担。