Update zabbix_agent.sh
This commit is contained in:
@@ -24,7 +24,7 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
|
rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
|
||||||
# install the zabbix agent
|
# install the zabbix agent
|
||||||
yum install -y zabbix-agent
|
yum install -y zabbix-agent
|
||||||
cat << EOF >> /etc/firewalld/services/zabbix.xml
|
cat << EOF >> /etc/firewalld/services/zabbix-agent.xml
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<service>
|
<service>
|
||||||
<short>zabbix agent</short>
|
<short>zabbix agent</short>
|
||||||
@@ -33,7 +33,7 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
<port protocol="udp" port="10050"/>
|
<port protocol="udp" port="10050"/>
|
||||||
</service>
|
</service>
|
||||||
EOF
|
EOF
|
||||||
firewall-cmd --add-service=zabbix --permanent
|
firewall-cmd --add-service=zabbix-agent --permanent
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
else
|
else
|
||||||
echo "Unable to determine linux distro"
|
echo "Unable to determine linux distro"
|
||||||
|
|||||||
Reference in New Issue
Block a user