Last active
April 9, 2020 12:32
-
-
Save mikl0s/9d40b2def58744198c0554eaf564d76f to your computer and use it in GitHub Desktop.
Zabbix installer for Rob
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 | |
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpm | |
yum clean all | |
yum install zabbix-agent -y | |
mv /etc/zabbix/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf.org | |
echo "PidFile=/var/run/zabbix/zabbix_agentd.pid" > /etc/zabbix/zabbix_agentd.conf | |
echo "LogFile=/var/log/zabbix/zabbix_agentd.log" >> /etc/zabbix/zabbix_agentd.conf | |
echo "LogFileSize=0" >> /etc/zabbix/zabbix_agentd.conf | |
echo "Server=127.0.0.1,45.76.91.88" >> /etc/zabbix/zabbix_agentd.conf | |
echo "Hostname=$HOSTNAME" >> /etc/zabbix/zabbix_agentd.conf | |
echo "ServerActive=127.0.0.1" >> /etc/zabbix/zabbix_agentd.conf | |
echo "Hostname=$HOSTNAME" >> /etc/zabbix/zabbix_agentd.conf | |
echo "Include=/etc/zabbix/zabbix_agentd.d/*.conf" >> /etc/zabbix/zabbix_agentd.conf | |
service zabbix-agent restart | |
chkconfig --level 35 zabbix-agent on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment