zabbix4.0版本(一)
1.安装zabbix-server
1.安装zabbix源
[root@ecs-t6-medium-2-linux-20190918110929 ~]#
[root@ecs-t6-medium-2-linux-20190918110929 ~]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server
2.启动MySQL
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start mariadb.service && systemctl enable mariadb.service
3.修改MySQL密码
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysqladmin password 123456
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysql -uroot -p
4.创建zabbix数据库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.01 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
5.测试连接数据库
[root@ecs-t6-medium-2-linux-20190918110929 ~]# mysql -uzabbix -pzabbix
6.导入数据库
[root@ecs-t6-medium-2-linux-20190918110929 zabbix-server-mysql-4.0.14]# zcat /usr/share/doc/zabbix-server-mysql-4.0.14/create.sql.gz |mysql -uzabbix -pzabbix zabbix
7.修改zabbix-server.conf
[root@ecs-t6-medium-2-linux-20190918110929 ~]# grep "^[a-Z]" /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
8.启动 Zabbix 服务进程,并加入开机自启
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start zabbix-server.service
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl enable zabbix-server.service
9.配置 Apache 的配置文件/etc/httpd/conf.d/zabbix.conf,修改时区
[root@ecs-t6-medium-2-linux-20190918110929 ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
10.启动httpdweb服务
[root@ecs-t6-medium-2-linux-20190918110929 ~]# systemctl start httpd
11.zabbix-web配置
修改中文
中文乱码
[root@ecs-t6-medium-2-linux-20190918110929 ~]# yum install wqy-microhei-fonts -y
[root@ecs-t6-medium-2-linux-20190918110929 ~]# cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/zabbix/assets/fonts/graphfont.ttf
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端