Debian下搭建zabbix监控
1. 搭建LAMP环境1
aptitude install mysql-server mysql-client apache2 apache2-doc php5 php5-mysql libapache2-mod-php5
1
2
3
vim my.cnf
character-set-server = utf8 #设置字符集utf8
innodb_file_per_table = 1 #让innodb每个表文件单独存储
2. 下载zabbix源安装包(这个包是一个安装源,安装以后相当于加入了zabbix的源)
1
2
3
wget http://repo.zabbix.com/zabbix/2.4/debian/pool/main/z/zabbix-release/zabbix-release_2.4-1+wheezy_all.deb
dpkg -i zabbix-release_2.4-1+wheezy_all.deb
apt-get update
3. 安装zabbix agent
1
apt-get install zabbix-agent
1
2
3
4
vim /etc/zabbix/zabbix_agentd.conf
Server="zabbix server 局域网 IP" #必须与zabbix server 中ListenIP一致
Hostname="zabbix agent 局域网 IP"
ListenIP="zabbix agent 局域网 IP"
4. 安装zabbix server
1
apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-get
1
2
vim /etc/zabbix/zabbix_server.conf
ListenIP=192.168.11.1
配置zabbix的Apache虚拟主机
1
2
3
4
5
6
7
8
9
vim /etc/apache2/sites-available/zabbix
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /usr/share/zabbix
include /etc/zabbix/apache.conf
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
基本的搭建已经完成
通过浏览器设置一些必要的参数,就可以进行初步的使用了
页:
[1]