标签:zabbix
一、文档
官方文档:https://www.zabbix.com/documentation/2.4/manual/installation/install
下载地址:http://www.zabbix.com/download.php
数据库文档:https://www.zabbix.com/documentation/2.4/manual/appendix/install/db_scripts
二、zabbix安装
1. 解压zabbix
tar -zxvf zabbix.2.x.x
2. 创建zabbix用户和组,并把zabbix加入zabbix组中
groupadd zabbix useradd -g zabbix zabbix
3. 安装LAMP环境
yum install –y httpd httpd-devel mysql mysql-server mysql-devel php php-devel php-mysql php-gd gcc gcc-c++ lrzsz wget net-snmp net-snmp-devell php-bcmath php-mbstring php-xmlwriter php-xmlreader
4. 创建zabbix数据库
shell> mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘ ‘; mysql> flush privileges; mysql> quit;
shell> mysql -uzabbix -p zabbix < database/mysql/schema.sql shell> mysql -uzabbix -p zabbix < database/mysql/images.sql shell> mysql -uzabbix -p zabbix < database/mysql/data.sql5.zabbix安装
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 make install
6. 配置zabbix
修改Zabbix_server
vim /usr/local/etc/zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.log DBName=zabbix DBUser=zabbix DBPassword=baywznb2015
修改Zabbix_agentd
vim /usr/local/etc/zabbix_agentd.conf Server=127.0.0.1 ServerActive=127.0.0.1 Hostname=ZabbixServer
将zabbix的前端文件拷贝到http下
mkdir /var/www/html/zabbix cd /usr/local/src/zabbix-2.4.7/frontends/php cp –a . /var/www/html/zabbix chwon -R apache.apache /var/www/html/zabbix
7. 配置php
post_max_size = 16M max_execution_time = 300 max_input_time = 300 memory_limit = 128M date.timezone =Asia/Shanghai
8. web界面安装
此处略过……
本文出自 “海豚小飞” 博客,请务必保留此出处http://7885315.blog.51cto.com/7875315/1729452
标签:zabbix
原文地址:http://7885315.blog.51cto.com/7875315/1729452