已有LNMP环境。
1、安装zabbix需要的依赖包,红色部门的包官方yum源没有,需要自己下载
yum install net-snmp fping iksemel net-snmp-devel
 
2、创建zabbx用户,
groupadd zabbix
useradd zabbix -g zabbix
mkdir /usr/local/zabbix
chown zabbix:zabbix /usr/local/zabbix
usermod zabbix -s /sbin/nologin
 
3、数据库创建,并授权给zabbix用户
shell> mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '密码';
mysql> flush privileges;
mysql> quit;
 
4、将zabbix数据库文件导入mysql,导入数据的时候有可能导入不了,请重新在数据库里面刷新权限,重新试试。
cd /usr/src/zabbix-3.2.2/database/mysql/
mysql -uzabbix –p zabbix <schema.sql
mysql -uzabbix -p zabbix <images.sql
mysql -uzabbix -p zabbix <data.sql
 
5、编译zabbix
./configure --prefix=/usr/local/zabbix \
--enable-server \
--enable-agent \
--with-net-snmp \
--with-mysql \
--with-libcurl \
--with-libxml2
 
make
make install
 
 
 
6、将php文件拷贝到你的反向代理程序的web目录,将启动脚本放到zabbix主目录中
cd /usr/src/zabbix-3.2.2/frontends/php
cp -a . /usr/local/nginx/html
chown -R nginx:nginx /usr/local/nginx/html
ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/
ln -s /usr/local/zabbix/bin/* /usr/local/bin/
echo "/usr/local/mysql/lib" >> /etc/ld.so.conf
ldconfig
 
cp /usr/src/zabbix-3.2.2/misc/init.d/fedora/core/zabbix_server /usr/local/zabbix/
cp /usr/src/zabbix-3.2.2/misc/init.d/fedora/core/zabbix_agentd /usr/local/zabbix/
 
 
7、更改zabbix_server.conf配置文件
 
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
 
 
8、启动zabbix程序
 
[root@cloud zabbix]# ./zabbix_server start
登录http://ip,配置相关GUI参数
 
 
 
 
附录:
 
[root@cloud zabbix-3.2.2]# ./configure --help
`configure' configures Zabbix 3.2.2 to adapt to many kinds of systems.
 
Usage: ./configure [OPTION]... [VAR=VALUE]...
 
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.
 
Defaults for the options are specified in brackets.
 
Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']
 
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]
 
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
 
For better control, use the options below.
 
Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/zabbix]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
 
Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
 
System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 
Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --disable-largefile     omit support for large files
  --enable-static         Build statically linked binaries
  --enable-server         Turn on build of Zabbix server
  --enable-proxy          Turn on build of Zabbix proxy
  --enable-agent          Turn on build of Zabbix agent and client utilities
  --enable-java           Turn on build of Zabbix Java gateway
  --enable-ipv6           Turn on support of IPv6
 
Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-ibm-db2=[ARG]    use IBM DB2 CLI from given sqllib directory
                          (ARG=path); use /home/db2inst1/sqllib (ARG=yes);
                          disable IBM DB2 support (ARG=no)
  --with-ibm-db2-include=[DIR]
                          use IBM DB2 CLI headers from given path
  --with-ibm-db2-lib=[DIR]
                          use IBM DB2 CLI libraries from given path
  --with-mysql[=ARG]      use MySQL client library [default=no], optionally
                          specify path to mysql_config
  --with-oracle=[ARG]     use Oracle OCI API from given Oracle home
                          (ARG=path); use existing ORACLE_HOME (ARG=yes);
                          disable Oracle OCI support (ARG=no)
  --with-oracle-include=[DIR]
                          use Oracle OCI API headers from given path
  --with-oracle-lib=[DIR] use Oracle OCI API libraries from given path
  --with-postgresql[=ARG] use PostgreSQL library [default=no], optionally
                          specify path to pg_config
  --with-sqlite3[=ARG]    use SQLite 3 library [default=no], optionally
                          specify the prefix for sqlite3 library
 
If you want to use Jabber protocol for messaging:
  --with-jabber[=DIR]     Include Jabber support [default=no]. DIR is the
                          iksemel library install directory.
 
If you want to use XML library:
  --with-libxml2[=ARG]    use libxml2 client library [default=no], optionally
                          specify path to xml2-config
 
If you want to use unixODBC library:
  --with-unixodbc[=ARG]   use ODBC driver against unixODBC package
                          [default=no], optionally specify full path to
                          odbc_config binary.
 
If you want to use Net-SNMP library:
  --with-net-snmp[=ARG]   use Net-SNMP package [default=no], optionally
                          specify path to net-snmp-config
 
If you want to use SSH2 based checks:
  --with-ssh2[=DIR]       use SSH2 package [default=no], DIR is the SSH2
                          library install directory.
 
If you want to check IPMI devices:
  --with-openipmi[=DIR]   Include OPENIPMI support [default=no]. DIR is the
                          OPENIPMI base install directory, default is to
                          search through a number of common places for the
                          OPENIPMI files.
 
If you want to use encryption provided by mbed TLS (PolarSSL) library:
  --with-mbedtls[=DIR]    use mbed TLS (PolarSSL) package [default=no], DIR is
                          the libpolarssl install directory.
 
If you want to use encryption provided by GnuTLS library:
  --with-gnutls[=DIR]     use GnuTLS package [default=no], DIR is the
                          libgnutls install directory.
 
If you want to use encryption provided by OpenSSL library:
  --with-openssl[=DIR]    use OpenSSL package [default=no], DIR is the libssl
                          and libcrypto install directory.
 
If you want to check LDAP servers:
  --with-ldap[=DIR]       Include LDAP support [default=no]. DIR is the LDAP
                          base install directory, default is to search through
                          a number of common places for the LDAP files.
 
If you want to use cURL library:
  --with-libcurl[=DIR]    use cURL package [default=no], optionally specify
                          path to curl-config
 
If you want to specify iconv installation directories:
  --with-iconv=[DIR]      use iconv from given base install directory (DIR),
                          default is to search through a number of common
                          places for the iconv files.
  --with-iconv-include=[DIR]
                          use iconv include headers from given path.
  --with-iconv-lib=[DIR]  use iconv libraries from given path.
 
Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  IKSEMEL_CFLAGS
              C compiler flags for IKSEMEL, overriding pkg-config
  IKSEMEL_LIBS
              linker flags for IKSEMEL, overriding pkg-config
 
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
 
Report bugs to the package provider.

centos 7 编译zabbix 3.2.2的更多相关文章

  1. centos下编译安装lnmp

    centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...

  2. CentOS 7 编译安装 Code::Blocks

    CentOS 7 编译安装 Code::Blocks yum install cairo-devel yum install pango-devel yum install atk-devel yum ...

  3. 在Linux CentOS上编译CoreCLR

    经过几天的努力,终于解决了在CentOS上编译CoreCLR的问题.最终发现问题是CMAKE_C_FLAGS的设置引起的. 只要在“src/pal/tools/clang-compiler-overr ...

  4. linux centos安装编译phantomjs 2.0的方法

    phantomjs 2.0最新版的官方不提供编译好的文件下载,只能自己编译,有教程但是过于简单,特别是服务器上要安装N多的支持.折腾到现在终于装好了并且能正常运行了,截图mark一下: linux c ...

  5. centos mysql 编译安装

    centos mysql 编译安装 1.安装 创建MySQL用户 sudo useradd mysql 下载MySQL的源码包,我们这里使用的时5.5.18 安装依赖 sudo yum -y inst ...

  6. 64位 CentOS NDK 编译 FFMPEG

    64位 CentOS NDK 编译 FFMPEG 一.           参考文章: http://www.cnblogs.com/baopu/p/4733029.html http://www.c ...

  7. centos 6 安装zabbix 3.0

    1.安装PHP Zabbix 3.0对PHP的要求最低为5.4,而CentOS6默认为5.3.3,完全不满足要求,故需要利用第三方源,将PHP升级到5.4以上,注意,不支持PHP7 rpm -ivh  ...

  8. centos 安装部署zabbix

    Zabbix_server初始安装部署 各模块要安装的模块 Server:server+nginx+mysql+php Agentd:agentd Proxy:proxy+mysql 1.准备环境: ...

  9. Ubuntu/CentOS下编译Nginx最基本参数

    Ubuntu/CentOS下编译Nginx安装基本参数,做个记录: groupadd www useradd -g www www ./configure --user=www --group=www ...

随机推荐

  1. 与资源库同步时,我的svn报错 Previous operation has not finished; run 'cleanup' if it was interrupted

    解决办法:选择你的项目,右键,小组(Team),刷新或清理(Refresh or Clean)即可.

  2. 《玩转D语言系列》三、轻松大跃进,把它当C语言先用起来

    前面说过,本系列文章的前提是您懂C语言,懂面向对象中的一些概念,如果没有任何变成基础,从零开始学习D语言将是一个漫长的过程,因为很多概念都要重新诠释,让一个没有基础的人经过漫长的学习过程,然后还找不到 ...

  3. 非常强大的table根据表头排序,点击表头名称,对其内容排序

    js代码: /** * 通过表头对表列进行排序 * * @param sTableID * 要处理的表ID<table id=''> * @param iCol * 字段列id eg: 0 ...

  4. 【原创】我所理解的自动更新-APP发布与后台发布

    发布后台 创建渠道:添加新的渠道,设置渠道名称,自动生成渠道id.    查看渠道:查看渠道基本信息,渠道app版本号,资源版本号,是否开启更新.    创建/更新APP:选择打包ios,androi ...

  5. 学习笔记:MySQL操作初步

    对数据库的操作:SQL语言 一:SQL:Structured Query Language,结构化查询语言! 二:DDL:Data Definition Language,数据定义语言 三:DML:D ...

  6. 用Swift语言做App开发之单元测试

    作为一个有质量保障的应用程序,当然少不了单元测试:Swift开发的App也亦如此,此文将以一个简单的实例来介绍Swift中的单元测试. 这里我们使用XCode模版自带的XCTest框架,此框架包含了一 ...

  7. IOS随机随学

    1.Objective-C是一种面向对象的语言. 2.Objective-C类声明和实现包括两个部分:接口部分和实现部分. 3.Objective-C中方法不是在“.”运算符,而是采用“[]”运算符. ...

  8. C# DllImport“调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配 ”

    调用外部dll时,出现如下问题 C# DllImport“调用导致堆栈不对称.原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配.请检查 PInvoke 签名的调用约定和参数与非托管的目标 ...

  9. IOS CALayer的阴影属性

    @property(nullable) CGColorRef shadowColor; /* The opacity of the shadow. Defaults to 0. Specifying ...

  10. VS2010无法调试问题解决

    最近,因为公司开发的需要,对开发环境进行全面的升级,在这其中也遇到了不少问题,在之后将陆续整理出来,以便以后查看. 之前开发环境:VS2008,ArcGIS9.3,ArcEngine9.3,Oracl ...