标签:use 目录 软件 开机 serve about err 修改 ase
lnmp环境请查看https://www.cnblogs.com/betterquan/p/12285956.html
但是!!!注意php的编译:
https://www.zabbix.com/documentation/4.0/zh/manual/installation/requirements 官方文档的环境要求
注意编译的时候一定要注意扩展库的启用,,有可能启动方式不一样,去php官网找与版本匹配的启动参数https://www.php.net/manual/zh/configure.about.php
环境介绍
软件 |
版本 |
nginx |
https://nginx.org/download/nginx-1.16.1.tar.gz |
php |
https://www.php.net/distributions/php-7.3.14.tar.gz |
mysql |
https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-boost-5.7.29.tar.gz |
zabbix |
https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.4.5/zabbix-4.4.5.tar.gz |
https://www.zabbix.com/documentation/4.0/zh/manual/installation/install官方zabbix 源码安装
具体过程关于zabbix
[root@ansz.quan.bbs packages]useradd zabbix [root@ansz.quan.bbs packages]$tar -xvzf zabbix-4.4.5.tar.gz 登陆数据库操作 mysql> create database zabbix character set=utf8; Query OK, 1 row affected (0.00 sec) mysql> create user ‘zabbix‘@‘localhost‘ identified by ‘zabbix2004‘; Query OK, 0 rows affected (0.00 sec) mysql> grant all privileges on zabbix.* to ‘zabbix‘@‘localhost‘ with grant option; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) 编译: ./configure --prefix=/usr/local/zabbix4.4.5 --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --with-net-snmp --with-libcurl 编译成功后make && make install
编译可能出现的问题:
1111问题:
checking for net-snmp-config... /usr/bin/net-snmp-config checking for main in -lnetsnmp... yes checking for localname in struct snmp_session... yes checking for zlib support... yes checking for process shared libpthread support... checking for pthread.h... (cached) yes yes checking for libevent support... no configure: error: Unable to use libevent (libevent check failed)
解决:
[root@ansz.quan.bbs zabbix-4.4.5]$yum install libevent libevent-devel -y
2222问题
configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config
解决
yum install -y net-snmp-devel
加入开机自启动
[root@ansz.quan.bbs tru64]$cp /data/packages/zabbix-4.4.5/misc/init.d/tru64/zabbix_server /etc/init.d/zabbix_server [root@ansz.quan.bbs tru64]$chmod +x /etc/init.d/zabbix_server [root@ansz.quan.bbs init.d]$vim /etc/init.d/zabbix_server 在第二行加入: #chkconfig: 2345 10 90 [root@ansz.quan.bbs init.d]$chkconfig --add zabbix_server [root@ansz.quan.bbs init.d]$chkconfig zabbix_server on
zabbix4.4.5彻底汉化
如果只是简单的在管理页面进行汉化,
在图形显示的时候会出现乱码:
必须通过下面方式进行修改:
zabbix4.4.5的路径和3.X的路径是不一样的了,
4.4.5的路径是在web设置目录下的assets/fonts下
在这里我是的字体存放路径是
/usr/local/nginx/html/assets/fonts
[root@ansz.quan.bbs fonts]$cd /usr/local/nginx/html/assets/fonts
[root@ansz.quan.bbs fonts]$ls
DejaVuSans.ttf
默认只有这个字体,我们需要在我们的windows电脑上传字体
[root@ansz.quan.bbs fonts]$ls
DejaVuSans.ttf simhei.ttf
最好选后缀为ttf的上传,因为默认的也ttf后缀
记得修改权限:
[root@ansz.quan.bbs html]$chown -R nginx:nginx fronts
修改环境php文件
[root@ansz.quan.bbs include]$cd /usr/local/nginx/html/include/ [root@ansz.quan.bbs include]$vim locales.inc.php 修改的地方是,将下面的cs_CZ对应的display改为true
function getLocales() { return [ ‘en_GB‘ => [‘name‘ => _(‘English (en_GB)‘), ‘display‘ => true], ‘en_US‘ => [‘name‘ => _(‘English (en_US)‘), ‘display‘ => true], ‘bg_BG‘ => [‘name‘ => _(‘Bulgarian (bg_BG)‘), ‘display‘ => false], ‘ca_ES‘ => [‘name‘ => _(‘Catalan (ca_ES)‘), ‘display‘ => false], ‘zh_CN‘ => [‘name‘ => _(‘Chinese (zh_CN)‘), ‘display‘ => true], ‘zh_TW‘ => [‘name‘ => _(‘Chinese (zh_TW)‘), ‘display‘ => false], ‘cs_CZ‘ => [‘name‘ => _(‘Czech (cs_CZ)‘), ‘display‘ => true],
[root@ansz.quan.bbs include]$vim defines.inc.php 修改的地方: 11111 define(‘ZBX_GRAPH_FONT_NAME‘, ‘simhei‘); // font file name 22222 define(‘ZBX_FONT_NAME‘, ‘simhei‘); 上面simhei就是我上传的字体的不带后缀的名字,
重启生效即可
如图
标签:use 目录 软件 开机 serve about err 修改 ase
原文地址:https://www.cnblogs.com/betterquan/p/12302369.html