您的位置:首页 > 其它

zabbix 编译安装

2015-12-25 09:26 357 查看
#install lamp
yum install gcc glibc glibc-common cairo pango zlib zlib-devel freetype freetype-devel gd gd-devel -y
yum install mysql* httpd* php* --skip-broken -y

#add user for zabbix
groupadd zabbix
useradd -g zabbix zabbix

#download and install
wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.8/zabbix-2.2.8.tar.gz tar zxvf zabbix-2.2.8.tar.gz
cd zabbix-2.2.8

./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 #zabbix_server
#./configure --enable-agent #zabbix_agent
make && make install

mysql -e "create database zabbix character set utf8 collate utf8_bin;"
mysql -e "grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';"
mysql -e "flush privileges;"

cd database/mysql/
mysql zabbix <schema.sql
mysql zabbix < images.sql
mysql zabbix < data.sql

#http diretory
mkdir /usr/local/apache2/htdocs/zabbix #http diretory /var/www/html
cd frontends/php
cp -a . /usr/local/apache2/htdocs/zabbix #http diretory /var/www/html

#zabbix_server configure
vim /usr/local/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
DBSocket=/tmp/mysql.sock

#zabbix_agent configure
vim /usr/local/etc/zabbix_agentd.conf
Server=127.0.0.1,192.168.199.118
ServerActive=127.0.0.1,192.168.199.118
Hostname=192.168.199.119

#service start
zabbix_server
zabbix_agentd

#service stop
killall -9 zabbix_server
killall -9 zabbix_agentd

本文出自 “ThunderMeng” 博客,请务必保留此出处http://thundermeng.blog.51cto.com/9414441/1625295
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: