我的環境是:編譯安裝的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
- 監控項可以點擊測試,查看能否獲取數據
- 增加了添加腳本的功能