编译安装zabbix所需的依赖包
yum install gcc libxml2-devel unixODBC-devel net-snmp-devel liburl-devel libssh2-devel OpenIPMI-devel openssl-devel fping
下载zabbix安装包,下载地址:https://sourceforge.net/projects/zabbix/files/
解压
编译安装
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc -with-ssh2 --with-openipmi --with-openssl
make && make install
创建mysql数据库
create database zabbix character set = utf8;
导入源码包中的三个默认数据库
mysql -uroot -p zabbix < schema.sql
mysql -uroot -p zabbix < images.sql
mysql -uroot -p zabbix < data.sql
创建zabbix用户
useradd -s /sbin/nologin -M zabbix
mkdir /var/log/zabbix
chown zabbix.zabbix /var/log/zabbix
ln -s /usr/local/zabbix/etc /etc/zabbix
ln -s /usr/local/zabbix/bin/* /usr/bin/
ln -s /usr/local/zabbix/sbin/* /usr/sbin/
启动文件
cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
chmod 755 /etc/init.d/zabbix_*
修改启动文件中的安装路径
修改配置文件/etc/zabbix/zabbix_server.conf
将zabbix php文件拷贝到nginx网站目录 /frontends/php/
启动zabbix_server
网页访问zabbix,www.xxxx.com/zabbix/setup.php
防火墙配置