Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created April 19, 2017 08:58
Show Gist options
  • Save sbeliakou/3ad063dee638e02d71706e0488533dc5 to your computer and use it in GitHub Desktop.
Save sbeliakou/3ad063dee638e02d71706e0488533dc5 to your computer and use it in GitHub Desktop.
#!/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