`
ling凌yue月
  • 浏览: 339188 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

CentOS安装zabbix

阅读更多
                                      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.

分享到:
评论

相关推荐

    Centos7.9安装部署Zabbix6

    Centos7.9安装部署Zabbix6,需要安装包的发邮箱,文件里面包含邮箱地址

    Centos7.9安装zabbix6.0LTS版

    CentOS 7.9 安装 Zabbix 6.0 LTS 版 Zabbix 是一个基于 Web 的网络监控系统,能够实时监控服务器、网络设备和应用程序的状态。下面是 CentOS 7.9 安装 Zabbix 6.0 LTS 版的详细步骤。 安装 Nginx 首先,需要安装 ...

    centos下安装 zabbix

    在 CentOS 环境下安装 Zabbix 是一项关键任务,特别是在需要监控服务器性能和网络状况时。Zabbix 是一个开源的企业级监控解决方案,能够监控各种 IT 资源,包括网络设备、服务器、应用程序等。以下是在 CentOS 上...

    centos8安装zabbix6脚本

    在CentOS 8操作系统中安装Zabbix 6.0是一项常见的任务,尤其对于那些需要确保IT基础设施稳定运行的管理员来说。下面将详细介绍如何使用给定的资源在CentOS 8上进行Zabbix 6.0的安装。 首先,我们需要准备的是一个名...

    Centos 7.4 安装Zabbix 3.4

    ### Centos 7.4 安装Zabbix 3.4 #### 一、安装环境配置 为了确保Zabbix能够顺利地安装与运行,在CentOS 7.4系统上需要进行一些基本的环境配置。 ##### 关闭防火墙 1. **临时关闭防火墙**:通过执行`systemctl ...

    centos安装zabbix监控系统

    ### CentOS 下安装与配置 Zabbix 监控系统 Zabbix 是一款开源的企业级网络监控解决方案,它可以自动检测网络中的设备并进行监控,收集各种类型的性能数据,并能够通过各种方式进行告警通知,帮助管理员及时发现问题...

    基于centos7下zabbix的搭建

    在本教程中,我们将详细介绍如何在 CentOS 7 环境下搭建 Zabbix 5.0 监控系统。Zabbix 是一款开源的企业级监控解决方案,可以用来监控网络设备、服务器性能、应用服务等。以下是详细的步骤: 一、系统环境准备 在...

    centos7 zabbix 一键安装脚本

    shell脚本完成zabbix 3.4 版本的一键安装过程,减少新手或小白的操作难度,即装即用,快速体验。

    centos8安装zabbix5.0.docx

    centos8安装zabbix全套

    zabbix安装centosmysqlnginxphp配置

    首先,我们从【标题】"zabbix安装centosmysqlnginxphp配置"出发,可以明确我们要讨论的是在CentOS 7环境下搭建Zabbix监控系统,并涉及到三个核心组件:MySQL数据库、Nginx web服务器和PHP解释器。这三者共同构成了...

    centos7安装自动化安装zabbix5.0 shell脚本

    采用当前abbix5.0的最新软件,进行自动化安装zabbix服务端的整个体系,包括mysql、nginx、本机agent,省去人工配置,只...该shell脚本仅支持centos7版本,可调整zabbix的repo源从而支持更多版本 但相应参数也需要修改。

    CentOS Install Zabbix 3.0

    ### CentOS 安装 Zabbix 3.0 详解 #### 一、准备工作 在开始安装 Zabbix 3.0 之前,请确保您的 CentOS 系统已经更新至最新状态,并且安装了必要的工具如 `wget` 和 `tar`。此外,您需要确保服务器具有足够的资源来...

    centos7 安装zabbix4.2.pdf

    根据您提供的文件信息,可以提炼出以下关于CentOS 7安装Zabbix 4.2的知识点: ### CentOS 7安装Zabbix 4.2操作步骤: 1. **系统环境要求**:Zabbix 4.2对服务器的最低要求是CentOS 7,因为它需要较为现代的操作...

    centos7安装zabbix3.0超详细步骤解析

    CentOS 7 安装 Zabbix 3.0 超详细步骤解析 安装前准备 在安装 Zabbix 3.0 之前,需要安装依赖包,包括 `wget`、`net-snmp-devel`、`OpenIPMI-devel`、`httpd`、`openssl-devel`、`java`、`lrzsz`、`fping-devel`、...

    centos7.6/7.7+zabbix4.4.7+grafana6.4.4安装指导最新版

    CentOS 7.6/7.7 + Zabbix 4.4.7 + Grafana 6.4.4 安装指导 本文档将指导您在 CentOS 7.6/7.7 上安装 Zabbix 4.4.7 和 Grafana 6.4.4,并配置 MySQL 5.7 数据库。 环境准备 在开始安装之前,需要关闭防火墙和 ...

    zabbix6.2版本基于centos stream9 的部署手册

    # dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent # mysql -uroot -p password mysql&gt; create database zabbix character set utf8...

    centos7安装zabbix

    ### CentOS 7 上安装与配置 Zabbix 的详细步骤 #### 一、部署环境配置 **Zabbix 组件概述** Zabbix 是一款企业级开源监控工具,可以用来监控各种类型的网络参数,例如服务器 CPU 和内存使用情况等。在 CentOS 7 ...

    centos8部署zabbix6.4 虚拟机VMware部署

    网络运维之zabbix部署

Global site tag (gtag.js) - Google Analytics