zabbix-agent install
2019-06-15如果Yum install安装zabbix-agent 会附带很多包,建议编译安装
1、RedHat-based system, run:
groupadd --system zabbix
useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
mkdir -m u=rwx,g=rwx,o= -p /usr/lib/zabbix
chown zabbix:zabbix /usr/lib/zabbix
2、tar -zxvf zabbix-4.2.3.tar.gz
./configure --enable-agent --sysconfdir=/etc/zabbix --sbindir=/sbin
make
make install
3、Yum安装
#!/bin/sh
#install /etc/yum.repos/zabbix.repo
yum -y install http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
yum -y install zabbix-agent.x86_64
cat > /etc/zabbix/zabbix_agentd.conf << EOF PidFile=/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=0 Server=172.16.0.165 ServerActive=172.16.0.165 Hostname=server78 EOF systemctl restart zabbix-agent 3、vi zabbix-agent.service 4、ll /usr/sbin/zabbix_agentd systemctl enable zabbix-agent systemctl start zabbix-agent cd /etc/zabbix/ vi zabbix_agentd.conf 5、netstat -ntlp
分类:Linux | 标签: |