Created
April 19, 2017 08:58
-
-
Save sbeliakou/3ad063dee638e02d71706e0488533dc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum install -y http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm | |
# Installing Zabbix Agent | |
yum install -y zabbix-agent | |
server="${1}" | |
if [ -n "${server}" ]; then | |
sed -i 's/Server=.*/Server='${server}'/' /etc/zabbix/zabbix_agentd.conf | |
sed -i 's/Hostname=Zabbix server/Hostname='$(hostname)'/' /etc/zabbix/zabbix_agentd.conf | |
fi | |
systemctl start zabbix-agent | |
systemctl enable zabbix-agent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment