#只适用linux2.6内核64位版本,自行修改下载所需版本
#!/bin/bash cd /opt useradd zabbix wget -c http://www.zabbix.com/downloads/3.0.0/zabbix_agents_3.0.0.linux2_6_23.amd64.tar.gz tar zxf zabbix_agents_3.0.0.linux2_6_23.amd64.tar.gz sed -i ‘s/127.0.0.1/10.7.0.208/g‘ /opt/conf/zabbix_agentd.conf /opt/sbin/zabbix_agentd -c /opt/conf/zabbix_agentd.conf net=`netstat -tlunp | grep 10050 | wc -l` if [ $net -ge 1 ] then echo "10050 is working" else echo "error" fi
时间: 2024-10-18 08:40:15