Hi guys,
As I like this software a lot, I wrote a simple bash deploy script which get the source, compile, and run the agent.
It's very basic but it works, feel free to improve it.
Ps: don't forget to change the server IP and eventually the binaries location.
As I like this software a lot, I wrote a simple bash deploy script which get the source, compile, and run the agent.
It's very basic but it works, feel free to improve it.
Ps: don't forget to change the server IP and eventually the binaries location.
Code:
########################################### ## ## Zabbix Client install Script ## ########################################### #!/bin/bash wget http://heanet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.4.2.tar.gz sleep 2 tar xzf zabbix-1.4.2.tar.gz cd zabbix-1.4.2 ./configure --enable-agent make make install echo "make complete" sleep 2 groupadd zabbix useradd -c 'zabbix' -d /home/zabbix -g zabbix -s /dev/null zabbix echo "zabbix_agent 10050/tcp # Zabbix ports" >> /etc/services echo "zabbix_trap 10051/tcp" >> /etc/services echo Hostname=`uname -n` >> ./misc/conf/zabbix_agentd.conf mkdir /etc/zabbix/ sed -e 's/Server=127.0.0.1/Server=XXXXXXXXXXX/g' ./misc/conf/zabbix_agentd.conf > /etc/zabbix/zabbix_agentd.conf chown -R zabbix.zabbix /etc/zabbix #Init Script sed -e 's/progdir=\"\/usr\/local\/zabbix\/bin\/\"/progdir=\"\/usr\/local\/bin\/\"/g' ./misc/init.d/redhat/8.0/zabbix_agentd > /etc/init.d/zabbix-agent chmod +x /etc/init.d/zabbix-agent #Debian #update-rc.d defaults zabbix-agent #Redhat chkconfig --add zabbix-agent /etc/init.d/zabbix-agent start #tail /tmp/zabbix_agentd.log
Comment