1、下载源码:Zabbix download page,解压
tar -zxvf zabbix-4.2.0.tar.gz
2、创建用户:
groupadd --system zabbix
useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
3、创建mysql用户及zabbix数据库:
shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
创建账户:
create user zabbix@localhost identified by '123456';
赋予权限:
grant all privileges on zabbix.* to zabbix@localhost;
flush privileges;
shell> cd zabbix-4.2.0/database/mysql
shell> mysql -uzabbix -p<password> zabbix < schema.sql
shell> mysql -uzabbix -p<password> zabbix < images.sql
shell> mysql -uzabbix -p<password> zabbix < data.sql
4、源码安装zabbix之前安装依赖包:
yum -y install unixODBC-devel mysql-devel net-snmp-devel libxml2-devel libcurl-devel libevent-devel
5、
编译:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
安装:
make install