1. 安装mysql
CREATE DATABASE zabbix;
GRANT ALL ON zabbix.* TO ‘zabbix‘@‘192.168.19.%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL ON zabbix.* TO ‘zabbix‘@‘localhost‘ IDENTIFIED BY ‘123456‘;
GRANT ALL ON zabbix.* TO ‘zabbix‘@‘mysql.jason.com‘ IDENTIFIED BY ‘123456‘;
FLUSH PRIVILEGES;
service mysqld start
2. groupadd zabbix
useradd -g zabbix zabbix
3. yum install -y curl curl-devel net-snmp snmp net-snmp-devel perl-DBI php-gd php-xml php-bcmath php-mbstring
4. 导入数据库文件:
wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gz
tar xf zabbix-3.0.0alpha2.tar.gz
cd zabbix-3.0.0alpha2/database/mysql/
/usr/local/mysql/bin/mysql -uzabbix -p123456 zabbix < schema.sql //导入顺序不能错
/usr/local/mysql/bin/mysql -uzabbix -p123456 zabbix < images.sql
/usr/local/mysql/bin/mysql -uzabbix -p123456 zabbix < data.sql
5.编译安装参数
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --enable-proxy --with-mysql --enable-net-snmp --with-libcurl
make && make install
6.查看端口:
#netstart -tnlp | grep ‘zabbix’
停止zabbix服务: