CentOS安装zabbix_PHP_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > PHP > CentOS安装zabbix

CentOS安装zabbix

 2011/11/17 9:36:51  ling凌yue月  http://chen498402552-163-com.iteye.com  我要评论(0)
  • 摘要:CentosZabbix安装1,建用户,不建议用root及有特殊权限的用户,会不安全#groupadd-g130zabbix#useradd-u130-gzabbix-c'Zabbixmonitoring'zabbix2,需要安装以下组件:?ZabbixServer(收集数据)?ZabbixAgent(监视)?Net-SNMP(为了支持SNMP(简单网络管理协议))?Jabber(支持消息通知)?OpenIPMI(监视)?cURL(网页监视)3,安装依赖包#yuminstallzlib
  • 标签:安装 CentOS
                                      Centos Zabbix 安装
1,建用户,不建议用root及有特殊权限的用户,会不安全
# groupadd -g 130 zabbix
# useradd -u 130 -g zabbix -c 'Zabbix monitoring' zabbix
2,需要安装以下组件:
  ? Zabbix Server (收集数据)
  ? Zabbix Agent (监视)
  ? Net-SNMP (为了支持 SNMP(简单网络管理协议))
  ? Jabber (支持消息通知)
  ? OpenIPMI (监视)
  ? cURL (网页监视)
3,安装依赖包
    #yum install zlib-devel mysql-devel glibc-devel curl-devel gcc automake mysql libidn-devel openssl-devel net-snmp-devel rpm-devel OpenIPMI-devel

    安装Jabber需要依赖于iksemel包的iksemel-devel包,但是在CentOS 的Repo里没有,所以我们要用EPEL(Extra Packages for Enterprise Linux)
    配置 EPEL库从http://fedoraproject.org/wiki/EPEL/FAQ#howtouse:
   # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    安装 iksemel-devel包和iksemel包
# yum --enablerepo=epel install iksemel iksemel-devel

4,下载zabbix-1.8.1.tar.gz 从 http://www.zabbix.com/download.php
5,编译安装
    #tar zxvf zabbix-1.8.8.tar.gz
    #cd zabbix-1.8.1
    # ./configure --prefix=/usr/local/zabbix --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl --with-openipmi --enable-agent
出现:
***********************************************************
*            Now run 'make install'                           *
*                                                                        *
*            Thank you for using Zabbix!                   *
*              <http://www.zabbix.com>                    *
***********************************************************

    #make install
6,生成rpm
    #wget http:// pkgs.repoforge.org/checkinstall/checkinstall-1.6.0-3.rh7.rf.i386.rpm
    # rpm -ivh checkinstall-1.6.0-3.rh7.rf.i386.rpm
    # yum install rpm-build
    # cd zabbix-1.8.8
    # checkinstall --nodoc --install=yes
**********************************************************************

Done. The new package has been installed and saved to

/usr/src/redhat/RPMS/i386/zabbix-1.8.8-1.i386.rpm

You can remove it from your system anytime using:

      rpm -e zabbix-1.8.8-1

**********************************************************************
表示安装完成

参考地址:http://www.zabbix.com/wiki/howto/install/centos/centosinstall


----------------------以下是原文------------------------------
    Zabbix 1.8.x on CentOS using source (manual)
    Works also with Zabbix 1.8.1 - 1.8.5 and CentOS 5.4 - 6.0. I have also tested this with Zabbix 1.9.5 on RHEL 5.7
    This Guide is for installing Zabbix 1.8.1 on CentOS 5.4 using a MySQL Database, I assume you have installed CentOS with Apache, MySQL, PHP, and a Mail Server during the Setup.
    # will indicate that we are using the prompt as the root user
    $ will indicate that we are using the prompt as a different user
    Setting up the user accounts
    The Zabbix server and client both need a user account that they can run on, so may as well set this up first. This also needs to be done on every monitored machine that is running the Zabbix agent:
    # groupadd -g 130 zabbix
    # useradd -u 130 -g zabbix -c 'Zabbix monitoring' zabbix
    I have added the ”-u 130” parameter – this ensures that the zabbix user gets created with the same user ID on every server that we created it on, as well as with the zabbix group (which will be group id 130).
    Zabbix Installation
    We will be installing following components:
  ? Zabbix Server (for gathering data)
  ? Zabbix Agent (for monitoring)
  ? Net-SNMP (for SNMP Support)
  ? Jabber (for notifications)
  ? OpenIPMI (for monitoring)
  ? cURL (for web monitoring)
    All these commands are done with the user root, starting of from the root home folder /root
Dependencies
      First install all the dependencies with yum using the command
   # yum install zlib-devel mysql-devel glibc-devel curl-devel gcc automake mysql libidn-devel openssl-devel net-snmp-devel rpm-devel OpenIPMI-devel
CentOS should find all packages in its Repo's and do the rest for you. For Jabber   we will need the packages iksemel-devel wich depends on iksemel, however these RPM's aren't in the CentOS Repo's so we will be use them from EPEL instead.
    Configure the EPEL repository from http://fedoraproject.org/wiki/EPEL/FAQ#howtouse:
    # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    Than we can install the following packages with yum
    # yum --enablerepo=epel install iksemel iksemel-devel
   Compile and Install Source
      Now that we have our dependencies set up we need to download the actual source, this can also be done with the wget command.
    # wget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/1.8.1/zabbix-1.8.1.tar.gz?use_mirror=freefr
    After it has downloaded the file we can unzip and untar with following command.
    # gunzip zabbix-1.8.1.tar.gz && tar -xvf zabbix-1.8.1.tar
    This should have created a folder called zabbix-1.8.1 in your home directory.  Next we need to browse to the directory and configure our setup.
    # cd zabbix-1.8.1
    # ./configure --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl --with-openipmi --enable-agent
    If you encounter any problems you should read the error messages carefully and check the config.log located in the same directory. If all goes well it will print out your configuration, please make sure following is set:
    Enable server:         yes
    With database:         MySQL
    WEB Monitoring via:    cURL
    Native Jabber:         yes
    SNMP:                  net-snmp
    IPMI:                  openipmi
    Enable agent:          yes
  If everything matches the above we can carry on with the command make
    # make
   After make has compiled all the stuff we can use CHECKINSTALL as described in the next chapter - OR - we could simply proceed as usual with:
    # make install
  checkinstall
  After make has compiled we won't be using make install, but checkinstall which gives us the option to first make a RPM out of the installation and than install it.   This gives us the advantage to be able to deinstall Zabbix again with rpm. Because checkinstall also isn't on the CentOS Repo we will download it using wget to our home directory.
   # cd ..
   # wget http://dag.wieers.com/rpm/packages/checkinstall/checkinstall-1.6.0-3.el5.rf.i386.rpm
and than install checkinstall with rpm and rpmbuild with yum
    # rpm -ivh checkinstall-1.6.0-3.el5.rf.i386.rpm
    # yum install rpm-build
    Now we can use checkinstall to make a RPM and install it.
    # cd zabbix-1.8.1
    # checkinstall --nodoc --install=yes -y
    You Should be able to choose what kind of package that you wish you create, because CentOS is based on RedHat we are going for [R], type R and press Enter.
    If you don't encounter any errors you should get following output:
**********************************************************************
Done. The new package has been installed and saved to
/usr/src/redhat/RPMS/i386/zabbix-1.8.1-1.i386.rpm
You can remove it from your system anytime using:
     rpm -e zabbix-1.8.1-1
**********************************************************************
    Now Zabbix is installed.

发表评论
用户名: 匿名