1、linux主机安装客户端:
cd /usr/local/src
wget https://fossies.org/linux/misc/zabbix-3.4.7.tar.gz --no-check-certificate
tar -zxvf zabbix-3.4.7.tar.gz
cd zabbix-3.4.7
./configure --prefix=/usr/local/zabbix --enable-agent
make && make install
groupadd zabbix
useradd zabbix -g zabbix -s /sbin/nologin
sed '/Server=127.0.0.1/d' /usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
sed '/ServerActive=127.0.0.1/d' /usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
echo "Hostname=`hostname`">>/usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
echo "Server=你的zabbix服务器IP">>/usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
echo "ServerActive=你的zabbix服务器IP">>/usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
cd /usr/local/src/zabbix-3.4.7/src/zabbix_agent/
./zabbix_agentd --config /usr/local/src/zabbix-3.4.7/conf/zabbix_agentd.conf
2、检查10050端口是否开启,开启表示zabbix客户端启动成功:
![img_efc118f0782607c5661ff5310e038b91.png](https://yqfile.alicdn.com/img_efc118f0782607c5661ff5310e038b91.png?x-oss-process=image/resize,w_1400/format,webp)
3、登录zabbix站点,添加主机:配置--主机--创建主机
![img_f394f9fa3bfd9c255bc19dadd35ee019.png](https://yqfile.alicdn.com/img_f394f9fa3bfd9c255bc19dadd35ee019.png?x-oss-process=image/resize,w_1400/format,webp)
4、填写信息:客户端主机名称,可见名称,分配在LINUX和templates群组里,客户端主机IP
![img_1005ded98497b617acee5abff662fcea.png](https://yqfile.alicdn.com/img_1005ded98497b617acee5abff662fcea.png?x-oss-process=image/resize,w_1400/format,webp)
5、添加模板:选择template linux os模板
![img_fc58096978ebd697646c3d93b2ed1b98.png](https://yqfile.alicdn.com/img_fc58096978ebd697646c3d93b2ed1b98.png?x-oss-process=image/resize,w_1400/format,webp)
6、点添加,zbx背景色为绿色即添加成功。
![img_2ae2e953c1b5474d628273d798dae223.png](https://yqfile.alicdn.com/img_2ae2e953c1b5474d628273d798dae223.png?x-oss-process=image/resize,w_1400/format,webp)