下载2.4.8,解压进行编译
./configure --prefix=/usr/local/zabbix_server --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
若没有编译器就则进行安装gcc gcc++
还需要安装mysql-devel,libxml2-devel,net-snmp,net-snmp-devel,libcurl-devel
编译完成后,make&&make install
配置zabbix
shell> mysql -uroot -p<password> mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘<password>‘; mysql> quit; shell> mysql -uzabbix -p<password> zabbix < database/mysql/schema.sql # stop here if you are creating database for Zabbix proxy shell> mysql -uzabbix -p<password> zabbix < database/mysql/images.sql shell> mysql -uzabbix -p<password> zabbix < database/mysql/data.sql
需要将php相关文件全部copy到apache目录下:
mkdir -p /var/www/html/zabbix
cp -rp * /var/www/html/zabbix
在安装目录下修改配置文件:
vim zabbix-server.conf
DBName,DBuser,DBPassword,以及数据库的socket文件DBSocket(/var/lib/mysql/mysql.sock)
将启动脚本copy到/etc/init.d下 zabbix-server,zabbix-agent并进行修改,
改一下路径,参照安装路径进行修改
然后启动,根据报错信息修改php配置文件/etc/php.ini
post_max_size,max_excecution_time,max_input_time,time_zone,bcmath
改完之后需要重启apache
需要安装php-bcmath,php-mbstring,php-gd,php-xmlwriter
同时下一步,然后创建zabbix.conf,vim /var/www/html/zabbix/conf/zabbix.conf
然后将内容复制进去
编译安装zabbix
原文:http://www.cnblogs.com/we14578/p/6384521.html