Zabbix5之一:Zabbix5的安装部署
一,选择安装平台及安装的版本
在官网选择download根据需要选择版本
二,安装和配置zabbix服务
a,安装zabbix源
1 2 | # rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm # yum clean all |
b,安装zabbix服务端和客户端
1 | # yum install -y zabbix-server-mysql zabbix-agent |
c,安装zabbix前端
1 | yum install -y centos-release-scl |
编辑配置文件修改
1 | /etc/yum.repos.d/zabbix.repo |
设置enable=1其他配置保持不变
1 2 3 4 5 6 | [zabbix-frontend] name=Zabbix Official Repository frontend - $basearch baseurl=http: //repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend enabled=1 gpgcheck=1 gpgkey=file: ///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 |
安装zabbix前端包
1 | yum install -y zabbix-web-mysql-scl zabbix-nginx-conf-scl |
安装mariadb
1 | yum install -y mariadb-server |
启动mariadb
1 2 | # systemctl start mariadb # systemctl enable mariadb |
运行mariadb安全配置
1 | # mysql_secure_installation |
d,创建数据库
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | [root@localhost ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> create user zabbix@localhost identified by 'zabbix' ; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost; Query OK, 0 rows affected (0.01 sec) |
导入MySQL表
1 | #zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix |
e,为zabbix server配置数据库
1 | /etc/zabbix/zabbix_server.conf |
1 | DBPassword=zabbix |
f,为zabbix前端配置PHP
1 | /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf |
编辑文档
/etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
修改以下两项
1 | listen.acl_users = apache, nginx |
1 | php_value[ date .timezone] = Asia/Shanghai |
g,启动zabbix服务
1 2 | # systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm # systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm |
h,使用浏览器页面访问进行配置
本次主机的IP为192.168.1.101
1 | http: //192.168.1.101/setup.php |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
2020-05-15 使用Docker和K8s搭建FastDFS分布式文件系统
2019-05-15 Saltstack之使用salt安装es6.0以上的head插件
2017-05-15 Python之JSON序列