-
Notifications
You must be signed in to change notification settings - Fork 248
/
Copy pathzabbix-agent.sh
22 lines (16 loc) · 956 Bytes
/
zabbix-agent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
##################################################
# Author: Neo <netkiller@msn.com>
# Website http://netkiller.github.io
##################################################
dnf localinstall -y http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
dnf install -y zabbix-agent
cp /etc/zabbix/zabbix_agentd.conf{,.original}
#sed -i "s/# SourceIP=/SourceIP=<Zabbix Server IP Address>/" /etc/zabbix/zabbix_agentd.conf
#sed -i "s/Server=127.0.0.1/Server=<Zabbix Server IP Address>/" /etc/zabbix/zabbix_agentd.conf
#sed -i "s/ServerActive=127.0.0.1/ServerActive=<Zabbix Server IP Address>/" /etc/zabbix/zabbix_agentd.conf
#sed -i "s/Hostname=Zabbix server/Hostname=<Your hostname>/" /etc/zabbix/zabbix_agentd.conf
systemctl enable zabbix-agent.service
systemctl start zabbix-agent.service
# /etc/sysconfig/iptables
# -A INPUT -s <Zabbix Server IP Address> -p tcp -m state --state NEW -m tcp --dport 10050 -j ACCEPT