rpm -i zabbix-agent-5.0.1-1.el7.x86_64.rpm
sed -i 's/Hostname=Zabbix server/Hostname=QPL-fanwei-OA/g'
sed -i 's/Server=127.0.0.1/Server=domain/g' /etc/zabbix/zabbix_agentd.conf
echo "ip domain" >> /etc/hosts
firewall-cmd --zone=public --add-rich-rule 'rule family="ipv4" source address="ip" port port=10050 protocol=tcp accept' --permanent
firewall-cmd --reload
service zabbix-agent restart
chkconfig zabbix-agent on
配置psk加密
openssl rand -hex 32 > /etc/zabbix/zabbix_agentd.psk
echo "TLSConnect=psk" >> /etc/zabbix/zabbix_agentd.conf
echo "TLSAccept=psk" >> /etc/zabbix/zabbix_agentd.conf
echo "TLSPSKFile=/etc/zabbix/zabbix_agentd.psk" >> /etc/zabbix/zabbix_agentd.conf
echo "TLSPSKIdentity=tls001" >> /etc/zabbix/zabbix_agentd.conf
service zabbix-agent restart
.