准备工作:看看自己的系统:
1,下载源码,网站:https://www.zabbix.com/download_sources
2,解压源码包:tar -zxvf zabbix-3.4.6.tar.gz ,并创建zabbix用户:groupadd zabbix
创建用户组:useradd -g zabbix zabbix
3,编译选择自己需要的:
查看了mysql进程,发现本机上还没有mysql运行,于是我先安装mysql了。
结果还是报错。于是我安装了mysql-devel包
yum install mysql-devel问题解决,于是继续执行
问题2: LIBXML2 library not found
于是我继续安装yum -y install libxml2-devel问题解决
问题3: unixODBC library not found
继续安装: yum -y install unixODBC-devel
问题4:configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config
继续安装:yum -y install net-snmp-devel
问题5:SSH2 library not found
继续安装:yum -y install libssh2-devel
问题6:configure: error: Invalid OPENIPMI directory - unable to find ipmiif.h
继续安装:yum -y install OpenIPMI-devel
问题7:configure: error: Unable to use libevent (libevent check failed)
继续安装:yum install libevent-devel -y
问题8:zabbix Unable to use libpcre (libpcre check failed)
继续安装:yum -y install pcre*
问题9:Unable to find "javac" executable in path
继续安装:yum install java* -y
问题10:Curl library not found
继续安装:yum install curl-devel -y
4当你看到这个画面时候
恭喜你编译通过了,可以安装zabbix了,于是执行以下命令
make && make install