Linux 主机 yum安装zabbix-agent客户端

来源:互联网 发布:金融信用信息基础数据库查询 编辑:程序博客网 时间:2024/04/29 12:50

 下载zabbix仓库:

[root@node2 ~]# wget http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
--2016-01-14 23:46:25--  http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Resolving repo.zabbix.com... 87.110.183.174
Connecting to repo.zabbix.com|87.110.183.174|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11296 (11K) [application/x-redhat-package-manager]
Saving to: 鈥渮abbix-release-2.4-1.el6.noarch.rpm鈥


100%[============================================================================================================================================>] 11,296      11.6K/s   in 1.0s    


2016-01-14 23:46:26 (11.6 KB/s) - 鈥渮abbix-release-2.4-1.el6.noarch.rpm鈥saved [11296/11296]


安装:

[root@node2 zabbix]# rpm -ivh zabbix-release-2.4-1.el6.noarch.rpm 
warning: zabbix-release-2.4-1.el6.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing...                ########################################### [100%]
   1:zabbix-release         ########################################### [100%]


yum安装:

[root@node2 zabbix]# rpm -ivh zabbix-release-2.4-1.el6.noarch.rpm 
warning: zabbix-release-2.4-1.el6.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing...                ########################################### [100%]
   1:zabbix-release         ########################################### [100%]
[root@node2 zabbix]# ls
zabbix-release-2.4-1.el6.noarch.rpm
[root@node2 zabbix]# 
[root@node2 zabbix]# 
[root@node2 zabbix]# yum install zabbix-agent
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.163.com
zabbix                                                                                                                                                         |  951 B     00:00     
zabbix/primary                                                                                                                                                 |  23 kB     00:02     
zabbix                                                                                                                                                                        145/145
zabbix-non-supported                                                                                                                                           |  951 B     00:00     
zabbix-non-supported/primary                                                                                                                                   | 3.8 kB     00:00     
zabbix-non-supported                                                                                                                                                            15/15
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zabbix-agent.x86_64 0:2.4.7-1.el6 will be installed
--> Processing Dependency: zabbix for package: zabbix-agent-2.4.7-1.el6.x86_64
--> Running transaction check
---> Package zabbix.x86_64 0:2.4.7-1.el6 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


======================================================================================================================================================================================
 Package                                        Arch                                     Version                                       Repository                                Size
======================================================================================================================================================================================
Installing:
 zabbix-agent                                   x86_64                                   2.4.7-1.el6                                   zabbix                                   173 k
Installing for dependencies:
 zabbix                                         x86_64                                   2.4.7-1.el6                                   zabbix                                   163 k


Transaction Summary
======================================================================================================================================================================================
Install       2 Package(s)


Total download size: 336 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): zabbix-2.4.7-1.el6.x86_64.rpm                                                                                                                           | 163 kB     00:14     
(2/2): zabbix-agent-2.4.7-1.el6.x86_64.rpm                                                                                                                     | 173 kB     00:36     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                 6.4 kB/s | 336 kB     00:52     
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Importing GPG key 0x79EA5ED4:
 Userid : Zabbix SIA <packager@zabbix.com>
 Package: zabbix-release-2.4-1.el6.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
ksh-20100621-19.el6_4.4.x86_64 has installed conflicts pdksh: pdksh-5.2.14-30.x86_64
  Installing : zabbix-2.4.7-1.el6.x86_64                                                                                                                                                           1/2 
  Installing : zabbix-agent-2.4.7-1.el6.x86_64                                                                                                                                                     2/2 
  Verifying  : zabbix-agent-2.4.7-1.el6.x86_64                                                                                                                                                     1/2 
  Verifying  : zabbix-2.4.7-1.el6.x86_64                                                                                                                                                           2/2 


Installed:
  zabbix-agent.x86_64 0:2.4.7-1.el6                                                                                                                                                                    


Dependency Installed:
  zabbix.x86_64 0:2.4.7-1.el6                                                                                                                                                                          


Complete!

[root@node2 zabbix]# cd /etc/zabbix/
[root@node2 zabbix]# egrep -v "(^#|^$)" zabbix_agentd.orig>zabbix_agentd.conf 
[root@node2 zabbix]# vi zabbix_agentd.conf 

[root@node2 zabbix]# service zabbix-agent start

Starting Zabbix agent: [  OK  ]

0 0