centos系统一键安装zabbix客户端2023
yum -y install net-tools wgetcd /home
wget http://repo.zabbix.com/zabbix/5. ... .4-1.el7.x86_64.rpm
rpm -ivh zabbix-agent-5.4.4-1.el7.x86_64.rpm
NETWORK_CARD_NAME=`ls /sys/class/net | grep -v "\`ls /sys/devices/virtual/net/\`"`
for net_name in $NETWORK_CARD_NAME
do
possible_ip=`ifconfig $net_name | grep 'inet ' | sed 's/^.*inet //g' | sed 's/netmask.*$//g'`
if [ $possible_ip ]; then
ip=$possible_ip
fi
done
sed -i 's/Server=127.0.0.1/Server=zaip.7iidc.com/g' /etc/zabbix/zabbix_agentd.conf
sed -i "s/Hostname=Zabbix server/Hostname=$ip/g" /etc/zabbix/zabbix_agentd.conf
systemctl restart zabbix-agent
systemctl enable zabbix-agent
systemctl stop firewalld.service
systemctl status firewalld.service
systemctl disable firewalld.service
------------------------------------------------------------------------
yum install wget
wget wget http://soft.7iidc.com/sh/za.sh
shza.sh
systemctl stop firewalld.service
systemctl status firewalld.service
systemctl disable firewalld.service
页:
[1]