diff --git a/zabbix_agent.sh b/zabbix_agent.sh index d0a7719..9431cfb 100644 --- a/zabbix_agent.sh +++ b/zabbix_agent.sh @@ -12,6 +12,18 @@ fi DIRECTORY="/tmp/zabbix_install" mkdir ${DIRECTORY} +if [ -f /etc/debian_version ]; then + apt update + apt install -y snmpd curl +elif [ -f /etc/redhat-release ]; then + yum install -y net-snmp net-snmp-utils + firewall-cmd --zone=public --add-service=snmp --permanent + firewall-cmd --reload +else + echo "Unable to determine linux distro" + exit +fi + # download the correct file for the correct OS FILENAME="zabbix_repo.deb" DEBIAN_URL="http://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb"