I'm using the following method to roll out zabbix_agentd to all of our servers, mostly RHEL 4, some Fedora Core 5.
Modify some files in misc/conf/ and misc/init.d/ and also insert the following shell script into the zabbix-1.1betaXX directory:
Notice that the hostname needs to be set in the script before running this on each host. I've considered some ways to improve this, such as using $1 or trying to get the $HOSTNAME from the environment. Feel free to improve and post your changes here.
Also you'll need to modify the zabbix_agentd.conf file by commenting out the Hostname line so that the echo statement in the script can add it. And of course you'll need to put in your server's address and any other changes for your set up.
The misc/init.d/redhat/8.0/zabbix_agentd startup script also needs to be modified with the following lines (changes, not additions!):
After making these changes, you can simply copy the entire modified install directory to each of your hosts (gzip if you like) and run the installer. It's fairly verbose, so if anything doesn't jive you can fix it manually.
Modify some files in misc/conf/ and misc/init.d/ and also insert the following shell script into the zabbix-1.1betaXX directory:
Code:
./configure --enable-agent make make install groupadd zabbix useradd -c 'Zabbix' -d /home/zabbix -g zabbix -s /bin/bash zabbix echo "zabbix_agent 10050/tcp # Zabbix ports" >> /etc/services echo "zabbix_trap 10051/tcp" >> /etc/services echo Hostname=[INSERT HOSTNAME HERE] >> ./misc/conf/zabbix_agentd.conf mkdir /etc/zabbix/ cp -v ./misc/conf/zabbix_agentd.conf /etc/zabbix/ chown -R zabbix.zabbix /etc/zabbix cp -v ./misc/init.d/redhat/8.0/zabbix_agentd /etc/init.d/ chkconfig --add zabbix_agentd chkconfig zabbix_agentd on service zabbix_agentd start
Also you'll need to modify the zabbix_agentd.conf file by commenting out the Hostname line so that the echo statement in the script can add it. And of course you'll need to put in your server's address and any other changes for your set up.
The misc/init.d/redhat/8.0/zabbix_agentd startup script also needs to be modified with the following lines (changes, not additions!):
Code:
progdir="/usr/local/bin/"
su -c $progdir$prog - zabbix
Comment