zabbix

Install zabbix-agent 3.4 in Centos7

rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum -y install zabbix-agent
sed -i '/Server=127.0.0.1/c Server=0.0.0.0\/0' /etc/zabbix/zabbix_agentd.conf
sed -i '/ServerActive=127.0.0.1/c #ServerActive=' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent ; systemctl enable zabbix-agent
tail /var/log/zabbix/zabbix_agentd.log

echo "COUNT=\`iptables -L -n | grep 10050 | wc | awk '{print \$1}'\` " > /root/custom_fw.sh
echo "if [ \"\$COUNT\" -eq  \"0\" ] " >> /root/custom_fw.sh echo "then" >> /root/custom_fw.sh echo " iptables -I INPUT -p tcp --dport 10050 -s 0.0.0.0/0 -j ACCEPT" >> /root/custom_fw.sh echo "  iptables -I INPUT -p tcp --dport 10051 -s 0.0.0.0/0 -j ACCEPT" >> /root/custom_fw.sh echo "fi" >> /root/custom_fw.sh
echo "" >> /root/custom_fw.sh chmod +x /root/custom_fw.sh echo "*/3 * * * *  root    /root/custom_fw.sh >/dev/null 2>&1 ">> /etc/crontab systemctl reload crond