zabbix 3.2安装

zabbix 3.2安装方式一: 源码安装

1、从官网下载源码进行解压 

tar -zxvf zabbix-3.2.0.tar.gz

http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.2.7/zabbix-3.2.7.tar.gz/download

2、创建用户 Create user account 

groupadd zabbix
useradd -g zabbix zabbix

3、创建zabbix数据库 ,前提是已经搭建好MYSQL数据库 Create Zabbix database 

shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
# stop here if you are creating database with Zabbix packages
shell> cd zabbix-3.2.7/database/mysql
shell> mysql -uzabbix -p<password> zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -p<password> zabbix < images.sql
shell> mysql -uzabbix -p<password> zabbix < data.sql
  
4 Configure the sources
4.1 ./configure --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
4.2 make install

make install will by default install the daemon binaries (zabbix_server, zabbix_agentd, zabbix_proxy) in/usr/local/sbin and the client binaries (zabbix_get, zabbix_sender) in /usr/local/bin.

5. 编辑配置:/usr/local/etc/zabbix_server.conf

LogFile=/tmp/zabbix_server.log #日志
DBName=zabbix #数据库名称
DBUser=zabbix_user #数据库用户名
DBPassword=zabbix123 #数据库用户密码
DBSocket=/tmp/mysql.sock #数据库的sock文件位置


6. Start up the daemons
shell> zabbix_server
7.配置WEB ,Installing Zabbix web interface
mkdir <htdocs>/zabbix
将 frontends/php 复制到 www目录 :cp -a zabbix-3.2.0/frontends/php/* /var/www/html/

service httpd restart

8.登录web 初始化zabbix

Step 1

In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix

参考官网:https://www.zabbix.com/documentation/3.2/manual/installation/install



注意:Database host: 应该填服务器的地址,特别不是在本机打开浏览器的,否则后面会一直提示找不到 /var/lib/mysql/mysql.sock.


zabbix 3.2 客户端 yum安装:(注意操作系统版本)

Installing repository configuration package

1、Install the repository configuration package. This package contains yum (software package manager) configuration files.

# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
2、# yum install zabbix_agent

3、编辑配置 vim /etc/zabbix/zabbix_agent

PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=192.168.30.133  #被动模式下的 服务器IP

ServerActive=192.168.30.133  #主动模式 服务器IP

Hostname=Zabbix server  #Hostname 必须跟在web界面添加主机的 hostname 一致

4、#zabbix_agent   #启动客户端

5、在服务器端测试

zabbix_get -s 127.0.0.1 -p 10050 -k "system.cpu.load[all,avg1]"   # -s 后面跟客户端IP 

6、登录管理的web口 添加主机,并修改web管理界面语言  htttp://zabbix_server_ip/zabbix  默认账号:admin 密码:zabbbix


添加 host主机




完成主机添加后,过一会查看是否正常:


只有ZBX 状态的颜色为绿色,才正常。

如果一直为灰色,需检查配置文件、客户端与服务器的防火墙、进程是否都正常。


大功告成, 好多问题啊。。。。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值