安装配置zabbix-server
安装配置zabbix-server配置zabbix-web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.1/zabbix-2.4.1.tar.gz/download
# tar zxvf zabbix-2.4.1.tar.gz && cd zabbix-2.4.1/frontends/php
# cp -a . /data/www/zabbix/
# cat /etc/nginx/conf.d/zabbix.conf
server {
listen 80;
server_namezbx.company.com;
root /data/www/zabbix;
charset utf-8;
access_log/data/log/www/zabbix/access.logmain;
location / {
indexindex.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# mkdir -p /data/log/www/zabbix
# service nginx restart
安装新版本zabbix server
1
2
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
# yum install zabbix-server-mysql zabbix-agent
配置数据库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# mysql -h127.0.0.1 -P3306 -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to zabbix@127.0.0.1 identified by 'xxx';
mysql> exit
# cd /usr/share/doc/zabbix-server-mysql-2.4.1/create/
# ls
data.sqlimages.sqlschema.sql
# mysql -h127.0.0.1 -P3306 -uroot -p zabbix < schema.sql
Enter password:
# mysql -h127.0.0.1 -P3306 -uroot -p zabbix < images.sql
Enter password:
# mysql -h127.0.0.1 -P3306 -uroot -p zabbix < data.sql
Enter password:
3. 配置报警脚本
1
2
3
# ll /usr/lib/zabbix/alertscripts/
total 12
-rwxr-x--x 1 root root 3587 Oct 26 10:55 mailman.py
4. 修改字体为中文,可以从windows中找一个字体,替换为同名文件。
1
2
3
# ll /data/www/zabbix/fonts/
total 16400
-rw-r--r-- 1 ecweb ecweb 16791251 Dec 182013 DejaVuSans.ttf
页:
[1]