相关链接

zabbix官网:https://www.zabbix.com/

zabbix软件下载:https://www.zabbix.com/download

Zabbix 文档:https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages

系统环境

[root@zabbix-server ~]# cat /etc/redhat-release

CentOS release 6.6 (Final)

[root@zabbix-server ~]# setenforce 0

[root@zabbix-server ~]# /etc/init.d/iptables stop

安装zabbix

[root@zabbix-server ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm        该步将会自动创建yum源

[root@zabbix-server ~]# yum install zabbix-server-mysql zabbix-web-mysql -y

[root@zabbix-server ~]# yum install zabbix-agent -y


注:yum安装会将httpdphp做为依赖装好,且自动写好/etc/httpd/conf.d/zabbix.conf 文件

更改zabbix时区

[root@zabbix-server ~]# vim /etc/httpd/conf.d/zabbix.conf

php_value date.timezone Asia/Shanghai

[root@zabbix-server ~]# /etc/init.d/httpd restart


下载并配置数据库

[root@zabbix-server ~]# yum install -y mysql-server mysql

[root@zabbix-server ~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

[root@zabbix-server ~]# vim /etc/my.cnf

character-set-server = utf8

init-connect = 'SET NAMES utf8'

collation-server = utf8_general_ci

[root@zabbix-server ~]# /etc/init.d/mysqld restart


创建数据zabbix数据库并授权用户 

[root@zabbix-server ~]# mysql

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';


导入数据库文件

[root@zabbix-server ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/

[root@zabbix-server create]# mysql -uroot zabbix < schema.sql

[root@zabbix-server create]# mysql -uroot zabbix < p_w_picpaths.sql

[root@zabbix-server create]# mysql -uroot zabbix < data.sql


配置zabbix-server 

[root@zabbix-server ~]# vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

[root@zabbix-server ~]# /etc/init.d/zabbix-server start


进入网页配置

http://192.168.10.129/zabbix/setup.php

 

wKiom1mJ2eiQSfjoAAHjcp1v0Rc590.png

wKioL1mJ2emiz4DNAAG3ED_e6fk003.png

wKioL1mJ2eqT3g9GAAGDzMTUcBo539.png

wKiom1mJ2evgAB1UAAFeOiqLo9c125.png

密码是zabbix

wKioL1mJ2ezyZEZWAAFZ-xzuQbc364.png