Ŀ¼
²Ù×÷ϵͳҪÇó ................................................................................................................... 1 °²×°apache ...................................................................................................................... 1 °²×°php ........................................................................................................................... 1 °²×°mysqlÊý¾Ý¿âÈí¼þ ................................................................................................... 2 °²×°zabbix ....................................................................................................................... 2 ÅäÖÃzabbixÇ°¶Ë .............................................................................................................. 4 Windows·þÎñÆ÷°²×°zabbix agent ............................................................................... 12
²Ù×÷ϵͳҪÇó
Zabbix server:Centos6.3
Zabbix agent:centos,redhat,windows
°²×°apache
ÉÏ´«httpd-2.2.22.tar.gzÎļþµ½linux·þÎñÆ÷ Ö´ÐÐtar xvf httpd-2.2.22.tar.gz½øÐнâѹ ½øÈëhttpd-2.2.22Ŀ¼ִÐÐ./configure ½øÈëhttpd-2.2.22Ŀ¼ִÐÐmake
½øÈëhttpd-2.2.22Ŀ¼ִÐÐÖ´ÐÐmake install apache°²×°ÔÚ/usr/local/apache2Ŀ¼ÏÂ
°²×°php
1.Ö´ÐÐÒÔÏÂÃüÁî°²×°phpÐèÒªµÄ°ü
yum -y install wget gcc-c++ ncurses ncurses-devel cmake make perl bison openssl openssl-devel gcc* libxml2 libxml2-devel curl-devel libjpeg* libpng* freetype*;
2.Ö´ÐÐÒÔÏÂÃüÁ¹ØÁªyum°ü
cp -frp /usr/lib64/libjpeg.* /usr/lib/ ; cp -frp /usr/lib64/libpng* /usr/lib/; cp -frp /usr/lib64/libldap* /usr/lib;
ln -s /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so;
3.±àÒë°²×°php
tar xvf php-5.2.14.tar.gz; cd php-5.2.14;
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib --with-mysql=/usr/lib64/mysql --with-mysqli=/usr/bin/mysql_config --with-gd --enable-soap --enable-sockets --enable-xml --enable-mbstring --with-png-dir=/usr/local --with-jpeg-dir=/usr/local --with-curl=/usr/lib --with-freetype-dir=/usr/include/freetype2/freetype/ --enable-bcmath --enable-calendar --enable-zip
°²×°mysqlÊý¾Ý¿âÈí¼þ
1.Ö±½Óyum install mysql*°²×°mysql
2.°²×°Íê³ÉÒÔºó/etc/init.d/mysqld start Æô¶¯mysql
3.show databases ÑéÖ¤mysqlµÄ³É¹¦
Ïêϸ³ö´¦²Î¿¼£ºhttp://www.jb51.net/LINUXjishu/84221.html
°²×°zabbix
1.ͨ¹ýyum°²×°zabbixËùÐèµÄ×é¼þ(server)
yum -y install curl curl-devel net-snmp net-snmp-devel perl-DBI
3.´´½¨Óû§Õ˺Å(server) groupadd zabbix
useradd -g zabbix zabbix
usermod -s /sbin/nologin zabbix
4.´´½¨zabbixÊý¾Ý¿â²¢µ¼ÈëzabbixÊý¾Ý¿âÊý¾Ý(server) # mysql -u root -p123456
> grant all on zabbix.* to zabbix@localhost identified by '123456'; > create database zabbix; # tar zxvf zabbix-2.0.6.tar.gz # cd zabbix-2.0.6
# mysql -uzabbix -p123456 zabbix < database/mysql/schema.sql # mysql -uzabbix -p123456 zabbix < database/mysql/images.sql # mysql -uzabbix -p123456 zabbix < database/mysql/data.sql
5.±àÒë°²×°(server)
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl # make install
6. ±àÒë°²×°(agent)
tar zxvf zabbix-2.0.6.tar.gz cd zabbix-2.0.6
./configure --enable-agent make install
6.±à¼ÅäÖÃÎļþ(server)
Zabbix server¶ËÖ´ÐÐÒÔϲÙ×÷£º # vi /usr/local/etc/zabbix_server.conf LogFile=/var/log/zabbix_server.log DBHost=localhost DBName=zabbix DBUser=zabbix
DBPassword=123456
7. ±à¼ÅäÖÃÎļþ(agent)
# vi /usr/local/etc/zabbix_agentd.conf£¬Ìí¼ÓÒÔÏÂÄÚÈÝ LogFile=/var/log/zabbix_agentd.log Server=192.168.1.185(zabbix serverµÄIP) UnsafeUserParameters=1
Hostname=192.168.1.153(¿Í»§¶ËIP)
8.´´½¨ÈÕÖ¾Îļþ(server,agent) touch /var/log/zabbix_server.log
chmod 777 /var/log/zabbix_server.log touch /var/log/zabbix_agentd.log
chmod 777 /var/log/zabbix_agentd.log
9.Æô¶¯zabbix server½ø³Ì(server) zabbix_server
serverÆô¶¯¶Ë¿ÚΪ10051
10.Æô¶¯¿Í»§¶Ë½ø³Ì½ø³Ì(agent) zabbix_agentd
agentdÆô¶¯¶Ë¿ÚΪ10050