diff options
Diffstat (limited to '')
-rwxr-xr-x | install_zabbix.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/install_zabbix.sh b/install_zabbix.sh new file mode 100755 index 0000000..5fe02c5 --- /dev/null +++ b/install_zabbix.sh | |||
@@ -0,0 +1,33 @@ | |||
1 | sudo apt-get install m4 gcc make autoconf automake gettext libtool | ||
2 | sudo useradd -r -l zabbix | ||
3 | if [ ! -e zabbix-1.8.5.tar.gz ] | ||
4 | then | ||
5 | wget http://infinitegrid.org/zabbix-1.8.5.tar.gz | ||
6 | fi | ||
7 | if [ ! -e e zabbix-1.8.5 ] | ||
8 | then | ||
9 | tar xzf zabbix-1.8.5.tar.gz | ||
10 | fi | ||
11 | cd zabbix-1.8.5 | ||
12 | ./configure --enable-agent | ||
13 | make | ||
14 | sudo make install | ||
15 | sudo /sbin/ldconfig | ||
16 | sudo mkdir /etc/zabbix | ||
17 | sudo cp misc/conf/* /etc/zabbix | ||
18 | # Edit those conf files to suit. | ||
19 | sudo cat > /etc/init/zabbix-agent.conf << zzzzEOFzzzz | ||
20 | # zabbix-agent - Start zabbix agent | ||
21 | description "Zabbix Agent" | ||
22 | author "S. CANCHON" | ||
23 | start on runlevel [2345] | ||
24 | stop on runlevel [016] | ||
25 | respawn | ||
26 | expect daemon | ||
27 | exec /usr/local/sbin/zabbix_agentd | ||
28 | zzzzEOFzzzz | ||
29 | |||
30 | sudo service zabbix_agent start | ||
31 | # Copy one of the /etc/init.d links to upstart thingy | ||
32 | sudo update-rc.d zabbix-agent defaults | ||
33 | |||