zabbix安装官方文档非常详细:https://www.zabbix.com/download
1、Install and configure Zabbix server、
a、Install Repository with MySQL database
# rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
b、Install Zabbix server, frontend, agent
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
c、Create initial database
# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
Import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
d. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
e. Configure PHP for Zabbix frontend
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.# php_value date.timezone Europe/Riga
f. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:
# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd
安装过程非常简单,但是过程中遇到一些问题记录一下:
1、httpd之前其他程序安装过,安装过程中配置文件为覆盖,导致前端页面启动不了,删除装即可。
2、zabbix_server启动不了,发现是mysql连接不上,由于自己用的docker mysql,所以在/etc/zabbix/zabbix_server.conf中配置相应的参数即可。
zabbix是一个多语言监控系统,默认使用英文并且也支持中文语言,详见《zabbix汉化方法》,但是近期有人反映说zabbix里面看不到中文语言.请往下看
zabbix不支持中文图
开启zabbix对中文的支持
原来zabbix默认把对中文的支持给关闭了,我们需要修改zabbix的php源文件. 修改站点根目录下include/locales.inc.php文件.
1
2
3
4
5
6
7
8
9
10
11
|
# 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
.
.
.
.
.
.
.
.
.
.
.代码省略掉
.
.
.
.
.
.
.
.
)
;
}
|