linux和windos7 zabbix ageent 客户端安装_2018_lcf

一、linux 安装

在官网下载  https://www.zabbix.com/download_sources

[[email protected] lnmp_soft]# tar -xf zabbix-3.4.4.tar.gz
[[email protected] lnmp_soft]# cd zabbix-3.4.4/
[[email protected] zabbix-3.4.4]# ./configure  --enable-proxy --enable-agent

[[email protected] ~]# vim /usr/local/etc/zabbix_agentd.conf
Server=127.0.0.1,192.168.2.5                    //允许哪些主机监控本机
ServerActive=127.0.0.1,192.168.2.5                //允许哪些主机通过主动模式监控本机
Hostname=zabbix_server                        //设置本机主机名
LogFile=/tmp/zabbix_server.log                    //设置日志文件
UnsafeUserParameters=1                        //是否允许自定义key
[[email protected]ver ~]# zabbix_agentd            //启动监控agent

[[email protected] ~]# ss -ntulp |grep zabbix_agentd //查看端口信息为10050
tcp LISTEN 0 128 *:10050 *:* users:(("zabbix_agentd",pid=23505,fd=4),("zabbix_agentd",pid=23504,fd=4)

二、windows安装

下载地址: http://www.zabbix.com/downloads/2.4.4/zabbix_agents_2.4.4.win.zip

解压zabbix_agents_2.4.0.win.zip 并改名目录为zabbix_agents(当然这个目录名可以自定义)

linux和windos7 zabbix ageent 客户端安装_2018_lcf

 然后打开这个目录下的C:\zabbix_agents\conf\zabbix_agentd.win.conf  

找到conf下的配置文件 zabbix_agentd.win.conf ,修改LogFile、Server、ServerActive 、Hostname这几个参数。具体配置如下:

LogFile=E:\zabbix\zabbix_agentd.log    //日志文件存放位置

Server=172.17.22.155                  //填写你zabbix服务器IP

ServerActive=172.17.22.155            //填写你zabbix服务器IP

Hostname=Windows_A                    

1 . 然后进入到C:\Windows\System32目录下,找到cmd.exe程序 (注意有的人文件类型后缀是隐藏的就会看不到.exe)

2. 右键点击这个cmd.exe ,在弹出右键菜单中选  “以管理员身份运行(A)”  

3. 然后输入以下命令(记住根据你实际存放的路径做相应更改)

//第一条执行安装命令 -i 代表安装install ,成功安装会有提示
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -i -c C:\zabbix_agents\conf\zabbix_agentd.win.conf

//第二条执行启动运行命令 -s 表示启动服务 上面和下面的-c 都表示指从哪里读取配置文件 ,启动成功会有提示
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -c C:\zabbix_agents\conf\zabbix_agentd.win.conf -s

//第三条根据卸载服务命令
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -d


可查看帮助如下

linux和windos7 zabbix ageent 客户端安装_2018_lcf

 还可以通过查看服务项是否有这项来确定是否安装启动成功

linux和windos7 zabbix ageent 客户端安装_2018_lcf