zabbix 安装过程中遇到不少问题,下面就其过程做个总结:
安装依赖: yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel \ freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel \ glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs \ e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap \ openldap-devel nss_ldap openldap-clients openldap-servers pcre-devel libxslt \ libxslt-devel libtool-ltdl libtool-ltdl-devel wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz ./configure --prefix=/usr/local/php --enable-mbstring --enable-ftp --with-gd --with-pear --enable-sockets --enable-gd-native-ttf --with-zlib --enable-sysvsem --enable-sysvshm --with-xmlrpc --enable-xml --enable-shmop --enable-zip --with-mhash --with-mcrypt --enable-bcmath --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --with-openssl --with-jpeg-dir --with-freetype-dir --with-gettext --with-mysql --with-mcrypt=/usr/local/libcrypt/ --with-apxs2 --with-pdo-mysql 主要的有mbsting bcmath mcrypt apxs2 mysql make -j 5 && make install make 多线程,确实很快 ln -s /usr/local/php/bin/php /usr/bin/php cp php.ini-development /usr/local/php/etc/php.ini wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz/download ./configure --enable-server --enable-agent --enable-proxy --with-mysql --enable-ipv6 --with-libcurl --with-net-snmp --prefix=/usr/local/zabbix agent ./configure --prefix=/usr/local/zabbix --enable-agent useradd -M -s /sbin/nologin zabbix mysqladmin -uroot password "123456" create database zabbix grant all privileges on zabbix.* to zabbix@localhost identified by "123456"; mysql> create database zabbix character set utf8; mysql> use zabbix; mysql> source /root/zabbix-2.0.2/database/mysql/schema.sql; mysql> source /root/zabbix-2.0.2/database/mysql/data.sql; mysql> source /root/zabbix-2.0.2/database/mysql/images.sql; mkdir /var/www/html/zabbix/ cp -rfa frontends/php/* /var/www/html/zabbix/ cp misc/init.d/fedora/core5/zabbix_* /etc/init.d/ chmod -R 777 /var/www/html/zabbix/conf 默认的用户名:admin 密码:zabbix 在server 上测试 agent IP连通性 zabbix_get -sIP -p10050 -k"system.uptime"
安装完后可能不解析,主要是没有module_php5 模块,是因为php编译时没有加apxs2