zabbix rpm包安装文档

rpm包下载地址:

根据不同需求下载

本文以centos 6.7系统为例安装zabbix 2.2.10

IP:172.16.133.128

安装zabbix源

rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

安装zabbix

yum -y install  zabbix zabbix-agent zabbix-get zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql zabbix-sender

修改mysql表默认引擎(可选)

vim /etc/my.cnf

[mysqld]

default_table_type = InnoDB

启动mysql

service mysqld start

修改root密码

mysqladmin -u root password 123456

登陆数据库,创建zabbix数据库和用户

mysql -uroot -p123456

mysql>create database zabbix character set utf8 collate utf8_bin;

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

mysql>flush privileges;

mysql>\q

导入zabbix数据

cd /usr/share/doc/zabbix-server-mysql-2.2.10/create/

mysql -uroot -p123456 zabbix < schema.sql

mysql -uroot -p123456 zabbix < p_w_picpaths.sql

mysql -uroot -p123456 zabbix < data.sql

配置zabbix_server.conf中的数据库配置

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

php配置

vim /etc/httpd/conf.d/zabbix.conf

php_value max_execution_time 300

php_value memory_limit 128M

php_value post_max_size 16M

php_value upload_max_filesize 2M

php_value max_input_time 300

php_value date.timezone Asia/Shanghai

更改php的timezone(此处如果步更改会报错)

vim /etc/php.ini

date.timezone = Asia/Shanghai

启动apache

service httpd start

启动zabbix和agent

service zabbix-server start

service zabbix-agent start

浏览器输入配置

点击下一步依次检测php组件,数据库等配,最后输入默认账号密码Admin/zabbix登陆