安装 agent
git clone https://github.com/zabbixcn/zabbix3.0-rpm.git 下载
yum 安装
[root@moban RPMS]# pwd
/root/zabbix3.0-rpm/RPMS
[root@moban RPMS]# yum install zabbix-agent-3.0.0-1.el6.x86_64.rpm -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Setting up Install Process
Examining zabbix-agent-3.0.0-1.el6.x86_64.rpm: zabbix-agent-3.0.0-1.el6.x86_64
Marking zabbix-agent-3.0.0-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package zabbix-agent.x86_64 0:3.0.0-1.el6 will be installed
--> Processing Dependency: libodbc.so.2()(64bit) for package: zabbix-agent-3.0.0-1.el6.x86_64
--> Running transaction check
---> Package unixODBC.x86_64 0:2.2.14-14.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================
Package Arch Version Repository Size
========================================================================================================
Installing:
zabbix-agent x86_64 3.0.0-1.el6 /zabbix-agent-3.0.0-1.el6.x86_64 1.1 M
Installing for dependencies:
unixODBC x86_64 2.2.14-14.el6 base 378 k
Transaction Summary
========================================================================================================
Install 2 Package(s)
Total size: 1.4 M
Total download size: 378 k
Installed size: 2.2 M
Downloading Packages:
unixODBC-2.2.14-14.el6.x86_64.rpm | 378 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : unixODBC-2.2.14-14.el6.x86_64 1/2
Installing : zabbix-agent-3.0.0-1.el6.x86_64 2/2
Verifying : unixODBC-2.2.14-14.el6.x86_64 1/2
Verifying : zabbix-agent-3.0.0-1.el6.x86_64 2/2
Installed:
zabbix-agent.x86_64 0:3.0.0-1.el6
Dependency Installed:
unixODBC.x86_64 0:2.2.14-14.el6
Complete!
------------------------------------------------
配置 [root@moban RPMS]# vi /etc/zabbix/zabbix_agentd.conf
Server=172.16.15.176 #zabbix 服务器ip 用于被动模式
Hostname=172.16.15.177 #客户端本机ip
UnsafeUserParameters=1 #允许自定义参数,如不需要请关闭 默认关闭
EnableRemoteCommands=1 #允许远程执行命令,如无需要请款比,默认关闭
保存退出
--------------------------------------------------
关闭selinux 并配置好iptables 如不是用iptables请关闭
[root@moban RPMS]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@moban RPMS]# /etc/init.d/iptables status
iptables:未运行防火墙。
启动 zabbix_agent
[root@moban RPMS]# /etc/init.d/zabbix-agent start
Starting Zabbix agent: [确定]
查看 启动状态
[root@moban RPMS]# /etc/init.d/zabbix-agent status
zabbix_agentd (pid 2802) 正在运行...
-----------------------------------------------------
安装完成
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22390488/viewspace-2124869/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22390488/viewspace-2124869/