已有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. 自由缩放属性resize

    为了增强用户体验,CSS3增加了很多新的属性,其中resize就是一个重要的属性,它允许用户通过拖动的方式来修改元素的尺寸来改变元素的大小.到目前为止,可以使用overflow属性的任何容器元素. 在 ...

  2. 网络请求出错:The resource could not be loaded because the App Transport

    Google后查证,iOS9引入了新特性App Transport Security (ATS).详情:App Transport Security (ATS) 新特性要求App内访问的网络必须使用H ...

  3. $.ajx的用法

    $.ajax({type:'post',//可选geturl:'action.php',//这里是接收数据的PHP程序data:'data='dsa'',//传给PHP的数据,多个参数用&连接 ...

  4. 在access中如何创建数据库。你认为数据库在网站开发中所扮演的角色是什么。使用数据库和使用文件,两者的优缺点各是什么。

    首先在access里面填写所用的信息,将数据库创建,在导入程序设计里进行完成代码. 首先打开我们的access程序,打开方法是单击开始——所有程序. 所有程序中找到microsoft office文件 ...

  5. 亲手使用Sencha Touch + phonepag开发Web APP随笔 -- 环境安装篇

    最近因为有个项目需要制作APP,考虑到需要兼容Android和IOS,所以想采用WebAPP的方式来开发.现在是从零开始学习之路,走起-   通过网上博客和论坛,开始安装了一堆软件: 1. Sench ...

  6. 【数学】Matrix Multiplication

                                 Matrix Multiplication Time Limit: 2000MS   Memory Limit: 65536K Total S ...

  7. <hr> 的18种样式

    18 Simple Styles for Horizontal Rules (hr CSS Design) Simple Styles for <hr>'s Code: <!DOCT ...

  8. HttpClient 与 HtmlParser 简介 转载

    转载地址:https://www.ibm.com/developerworks/cn/opensource/os-cn-crawler/ 本小结简单的介绍一下 HttpClinet 和 HtmlPar ...

  9. angular_ui-router ——依赖注入

    Angularjs ui-router - 组件: $state / $stateProvider:管理状态定义.当前状态和状态转换.包含触发状态转换的事件和回调函数,异步解决目标状态的任何依赖项,更 ...

  10. springMVC下集成active MQ发送邮件

    环境:本地需安装activemq,且访问正常,安装方法网上很多,这里省略. 1.添加相关jar包,我这里使用的是maven,你也可以选择其他方式添加.下面是maven相关配置: <!-- Act ...