码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix安装配置

时间:2015-04-03 23:52:41      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:

安装centos linux。这次使用的是centos 6.4 X86_64版

使用base server配置安装系统

开启系统启动时显示详细信息

vim /boot/grub/grub.conf
将"rhgb"和 "quiet"去掉

启用网卡

vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes

关闭系统防火墙

#iptables -F
#service iptables stop
#chkconfig iptables off
禁用selinux
vi /etc/sysconfig/selinux
SELINUX=disabled

添加用户

groupadd zabbix
useradd zabbix -g zabbix

 安装httpd服务 

#yum install httpd
#chkconfig --add httpd
#chkconfig httpd on
#service httpd start

安装php支持

#yum install php*

配置php.ini

技术分享
#vi /etc/php.ini
short_open_tag = On
post_max_size = 32M
max_execution_time = 300
max_input_time = 300
date.timezone = Asia/Chongqing
技术分享

安装mysql服务

#yum install mysql mysql-server mysql-devel
#chkconfig --add mysqld
#chkconfig mysqld on
#service mysqld start
#mysqladmin -uroot password ‘password

配置mysql字符集

#vi /etc/my.cnf
增加配置
[mysqld]
character_set_server=utf8
init_connect=‘SET NAMES utf8‘

创建数据库

#mysql -uroot -ppassword
>create database zabbix character set utf8;
>grant all on zabbix.* to zabbix@localhost identified by ‘password‘; 
>flush privileges;

 下载zabbix

#mkdir /zabbix
#cd /zabbix #wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz
#tar zxvf zabbix-2.2.2.tar.gz

导入zabbix脚本sql

#mysql -uroot -ppassword zabbix < /zabbix/zabbix-2.2.2/database/mysql/schema.sql
#mysql -uroot -ppassword zabbix < /zabbix/zabbix-2.2.2/database/mysql/images.sql
#mysql -uroot -ppassword zabbix < /zabbix/zabbix-2.2.2/database/mysql/data.sql 

安装zabbix环境支持

#yum -y install curl curl-devel net-snmp net-snmp-devel perl-DBI
#yum -y install gcc make

安装zabbix

#./configure  --enable-server --enable-agent --enable-proxy --with-mysql --with-net-snmp --with-libcurl
#make install
#cp /usr/local/etc/* /etc/zabbix/
#cp -r frontends/php/* /var/www/html/

 配置zabbix

vi /usr/local/etc/zabbix_server.conf
vi /usr/local/etc/zabbix_agentd.conf

 访问http://localhost/  开始安装界面。

 添加zabbix服务

#chkconfig --add zabbix_server
#chkconfig zabbix_server on
#chkconfig --add zabbix_agentd
#chkconfig zabbix_agentd on

 添加windows主机

编辑c:\zabbix_agentd.conf
Server=zabbix_serverIP
ListenPort=10050
ServerActive=127.0.0.1:20051
Hostname=localhostname

添加zabbix_agentd服务,运行cmd,进入zabbix_agentd.exe所在目录

>zabbix_agentd -c "c:\zabbix_agentd.conf" -i 
>zabbix_agentd -c "c:\zabbix_agentd.conf" -s 

zabbix安装配置

标签:

原文地址:http://www.cnblogs.com/cyjs1988/p/4391233.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!