Linux服务器离线安装zabbix agent2

这里以CentOS7为例。

下载zabbix-agent2的rpm包

Zabbix Official Repository

上传至Linux服务器

可使用sftp工具,略

使用rpm命令安装

rpm -ivh zabbix-agent2-5.0.9-1.el7.x86_64.rpm

修改配置文件

vim /etc/zabbix/zabbix_agent2.conf

供参考

[root@l234u1 ~]# cat /etc/zabbix/zabbix_agent2.conf|grep -Ev '^$|#'
PidFile=/var/run/zabbix/zabbix_agent2.pid
LogFile=/var/log/zabbix/zabbix_agent2.log
LogFileSize=0
Server=192.168.1.120
ServerActive=192.168.1.120
Hostname=L234U1
Include=/etc/zabbix/zabbix_agent2.d/*.conf
ControlSocket=/tmp/agent.sock
Plugins.SystemRun.LogRemoteCommands=1
[root@l234u1 ~]#

重启agent2服务

systemctl restart zabbix-agent2.service

查看状态

[root@l234u1 ~]# systemctl status zabbix-agent2.service
● zabbix-agent2.service - Zabbix Agent 2
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-06-02 14:36:09 EDT; 11h left
 Main PID: 15997 (zabbix_agent2)
   CGroup: /system.slice/zabbix-agent2.service
           └─15997 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf

Jun 02 14:36:09 l234u1.hrst.com systemd[1]: Started Zabbix Agent 2.
Jun 02 14:36:09 l234u1.hrst.com systemd[1]: Starting Zabbix Agent 2...
Jun 02 14:36:09 l234u1.hrst.com zabbix_agent2[15997]: Starting Zabbix Agent 2 [L234U1]. (5.0.9)
Jun 02 14:36:09 l234u1.hrst.com zabbix_agent2[15997]: Press Ctrl+C to exit.
[root@l234u1 ~]#

《“Linux服务器离线安装zabbix agent2”》 有 1 条评论

  1. Greate post. Keep posting such kind of information on your site.
    Im really impressed by your blog.
    Hi there, You have done a fantastic job. I will certainly digg it and in my opinion suggest to
    my friends. I’m confident they will be benefited from this web site.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注