我的环境是:编译安装的nginx 1.18.0 编译安装的php7.3.18 编译安装的zabbix 5.0
我的系统是:centos 8.0 数据库使用的是:mysql 8.0
更新的功能在第三个标题
一、zabbix 中文支持
报错:Translations are unavailable because the PHP gettext module is missing.
找到更改语言页面,发现php不支持修改,常规操作 重新添加编译选项编译(如果是通过yum的话,直接安装相应包即可)
[root@iZ2ze1o php-7.3.18]#./configure --help | grep gettex
--with-gettext=DIR Include GNU gettext support
[root@iZ2ze1o php-7.3.18]# ./configure --prefix=/apps/php7.3.18 --enable-mysqlnd \
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-freetype-dir --with-jpeg-dir \
--with-png-dir --with-zlib --with-libxml-dir=/usr --with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d --enable-mbstring --enable-xml --enable-sockets \
--enable-fpm --enable-maintainer-zts --disable-fileinfo --with-gd --enable-bcmath --with-gettext
[root@iZ2ze1o php-7.3.18]#make && make install
[root@iZ2ze1o php-7.3.18]#systemctl restart php-fpm.service
我这是因为阿里云的centos8 自带了中文的语言,如果你们是最小化安装的,则需要安装中文语言包
https://blog.csdn.net/liuhaoy/article/details/105953633 这是我Ubuntu的文档,可以参考下
二、配置zabbix_agent
自带的agent 不用配置,直接启动即可
[root@iZ2ze1o ~]#/apps/zabbix5.0/sbin/zabbix_agentd
zabbix 有数据发现部分乱码,拷贝windows字体进去即可
[root@iZ2ze1o fonts]#ls
DejaVuSans.ttf stkaiti.ttf
[root@iZ2ze1o fonts]#pwd
/apps/nginx/html/zabbix/assets/fonts
[root@iZ2ze1o fonts]#chown nginx.nginx stkaiti.ttf
[root@iZ2ze1o fonts]#cd ../../
[root@iZ2ze1o zabbix]#pwd
/apps/nginx/html/zabbix
[root@iZ2ze1o zabbix]#vi include/defines.inc.php
define('ZBX_GRAPH_FONT_NAME', 'stkaiti'); // font file name
define('ZBX_FONT_NAME', 'stkaiti');
# 更改为你传入字体的名称,注意不用后缀
修改完字体不用重启服务,直接刷新页面就能看到效果了
三、zabbix 5.0 更新内容
- 增加了按主机查看
- 减去查看单个监控项的图形
- 增加了zabbix agent2 的客户端
- 增加了一些模板,如:redis
- 监控项可以点击测试,查看能否获取数据
- 增加了添加脚本的功能