vim /var/www/html/zabbix/conf/zabbix.conf.php //或者也手动写入配置
---------------------------------------------------------->
<?php
// Zabbix GUI configuration file.
global $DB;
$DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = ‘127.0.0.1';
$DB['PORT'] = '0';
$DB['DATABASE'] = 'zabbix';
$DB['USER'] = 'zabbix';
$DB['PASSWORD'] = ‘zabbix';
// Schema name. Used for IBM DB2 and PostgreSQL.
$DB['SCHEMA'] = '';
$ZBX_SERVER = ‘127.0.0.1';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';
$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
?>
原来zabbix默认把对中文的支持给关闭了,我们需要修改zabbix的php源文件. 修改站点根目录下include/locales.inc.php文件.
# vim include/locales.inc.php
function getLocales() {
return array(
'en_GB' => array('name' => _('English (en_GB)'), 'display' => true),
'en_US' => array('name' => _('English (en_US)'), 'display' => true),
'bg_BG' => array('name' => _('Bulgarian (bg_BG)'), 'display' => true),
'zh_CN' => array('name' => _('Chinese (zh_CN)'), 'display' => true),
//原本这里为false,请改为true
...........代码省略掉........
);
}
更多Zabbix相关教程集合:
在Ubuntu 16.04服务器上安装Zabbix 3.2