zabbix-agnet的安装
下载
更新apt源
https://www.zabbix.com/download?zabbix=4.0&os_distribution=ubuntu&os_version=18.04_bionic&db=mysql&ws=apache
wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
dpkg -i zabbix-release_4.0-3+bionic_all.deb
apt update
安装
apt install zabbix-agent
配置文件
vim /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid ###pid
LogFile=/var/log/zabbix/zabbix_agentd.log ##log位置
Server= ##zabbix-server的地址
SourceIP=你的IP地址 ##如果你有两个网卡就需要填
# ListenPort=10050 ##监听的端口,默认是10050
ServerActive= ##zabbix-server的地址
Hostname= ##机器的host名字
启动
/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
查看是否启动
ps -ef |grep zabbix
netstat -anp |grep 10050