#!/bin/bash
echo "-----------------------start install zabbix----------------------"
wget http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.4-1+trusty_all.deb
dpkg -i zabbix-release_2.4-1+trusty_all.deb
apt-get update
apt-get --missing
apt-get install zabbix-server-mysql zabbix-frontend-php
if [ $? -ne 0 ];then
echo "install failed ,please check it out!"
exit 1
fi
echo "ServerName 127.0.0.1:80" >> /etc/apache2/apache2.conf
service apache2 restart
service zabbix_server restart
时间: 2024-10-07 16:53:03