aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/install_zabbix.sh
blob: 5fe02c588a17a6cb51fb54091649819e5d72cd77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
sudo apt-get install m4 gcc make autoconf automake gettext libtool
sudo useradd -r -l zabbix
if [ ! -e zabbix-1.8.5.tar.gz ]
then
    wget http://infinitegrid.org/zabbix-1.8.5.tar.gz
fi
if [ ! -e e zabbix-1.8.5 ]
then
    tar xzf zabbix-1.8.5.tar.gz
fi
cd zabbix-1.8.5
./configure --enable-agent
make
sudo make install
sudo /sbin/ldconfig
sudo mkdir /etc/zabbix
sudo cp misc/conf/* /etc/zabbix
# Edit those conf files to suit.
sudo cat > /etc/init/zabbix-agent.conf << zzzzEOFzzzz
    # zabbix-agent - Start zabbix agent
    description     "Zabbix Agent"
    author          "S. CANCHON"
    start on runlevel [2345]
    stop on runlevel [016]
    respawn
    expect daemon
    exec /usr/local/sbin/zabbix_agentd
zzzzEOFzzzz

sudo service zabbix_agent start
# Copy one of the /etc/init.d links to upstart thingy
sudo update-rc.d zabbix-agent defaults