部署Icinga-php4

来源:http://www.cnblogs.com/ivictor/archive/2016/04/21/5412837.html
-Advertisement-
Play Games

關於Icinga-php4的文檔信息及下載地址,可參考:http://icinga-cn.sourceforge.net/ 我這裡使用的是icinga-pnp4-cn-1.12.2.tar.xz。 因為賬號限制的原因,在這裡並沒有新建icinga用戶,後續icinga的使用者是monitor用戶。後 ...


關於Icinga-php4的文檔信息及下載地址,可參考:http://icinga-cn.sourceforge.net/

我這裡使用的是icinga-pnp4-cn-1.12.2.tar.xz。

因為賬號限制的原因,在這裡並沒有新建icinga用戶,後續icinga的使用者是monitor用戶。後續預編譯的時候需指定。

一、按照依賴包

# yum install httpd gcc glibc glibc-common gd gd-devel

# yum install libjpeg libjpeg-devel libpng libpng-devel

# yum install net-snmp net-snmp-devel net-snmp-utils

二、解壓安裝包

# tar xvf icinga-pnp4-cn-1.12.2.tar.xz 

三、預編譯

# cd icinga-pnp4-cn-1.12.2

# ./configure --prefix=/home/monitor/icinga  --with-icinga-user=monitor -with-icinga-group=monitor --with-command-user=monitor --with-command-group=monitor  --enable-idoutils=no

註意:如果沒有帶指定後面的--enable-idoutils=no,編譯過程中會報configure: error: ERROR - We really need a libdbi to link against。

預編譯完成後,會輸出以下信息

*** Configuration summary for pnp4icinga-0.6.25 03-01-2015 ***

  General Options:
  -------------------------         -------------------
  Icingapnp4 user/group:                monitor monitor
  Install directory:                /home/monitor/icinga
  HTML Dir:                         /home/monitor/icinga/share
  Config Dir:                       /home/monitor/icinga/etc
  Location of rrdtool binary:       /usr/bin/rrdtool Version 1.3.8
  RRDs Perl Modules:                *** NOT FOUND ***
  RRD Files stored in:              /home/monitor/icinga/var/perfdata
  process_perfdata.pl Logfile:      /home/monitor/icinga/var/log/perfdata.log
  Perfdata files (NPCD) stored in:  /home/monitor/icinga/var/spool/perfdata

  Web Interface Options:
  -------------------------         -------------------
  HTML URL:                         http://localhost/icinga
  Apache Config File:               /etc/httpd/conf.d/icinga.conf


  Review the options above for accuracy.  If they look okay,
  type 'make all' to compile.

很顯然,RRDs Perl Modules沒有安裝,如果沒有安裝的話,會導致pnp出來的數據是亂碼。

# yum install rrdtool-perl

四、編譯

# make all

輸出信息如下:

*** Compile finished ***

If the main program and CGIs compiled without any errors, you
can continue with installing Icinga as follows (type 'make'
without any arguments for a list of all possible options):

  make install
     - This installs the main program (Icinga Core), CGIs
       (Classical Web), and HTML files

  make install-init
     - This installs the init script in /etc/rc.d/init.d

  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file

  make install-idoutils
     - This installs the database addon IDOUtils into the
       destination directory

  make install-config
     - This installs *SAMPLE* config files in /home/monitor/icinga/etc
       You'll have to modify these sample files before you can
       use Icinga.  Read the HTML documentation for more info
       on doing this.  Pay particular attention to the docs on
       object configuration files, as they determine what/how
       things get monitored!

  make install-webconf
     - This installs the Apache config file and http auth file for
       the Icinga Classic UI


  make install-webconf-auth
     - This installs the Apache http auth file for the Classic UI


 make install-processperfdata
     - pnp4icinga processperfdata in /home/monitor/icinga/libexec
 make install-plugins
     - pnp4icinga plugins in /home/monitor/icinga/libexec

除了make install-idoutils,依次執行上述命令

# make install

# make install-init

# make install-commandmode

# make install-eventhandlers

# make install-config

# make install-webconf

# make install-webconf-auth

# make install-processperfdata

# make install-plugins

五、配置經典WEB頁面

# make cgis

# make install-cgis

# make install-html

設置能訪問WEB頁面的用戶和密碼,在這裡,用戶名是icingaadmin,密碼是icinga

# htpasswd -c /home/monitor/icinga/etc/htpasswd.users icingaadmin

六、編譯和安裝Icinga插件

# tar xvf nagios-cn-plugins-2.0.3.tar.xz 

# cd nagios-cn-plugins-2.0.3

#./configure --prefix=/home/monitor/icinga  --with-nagios-user=monitor --with-nagios-group=monitor  

# make

# make install

七、編譯和安裝NRPE插件

# tar xvf icinga-nrpe-2.14.tar.gz 

# cd icinga-nrpe-2.14

# ./configure --prefix=/home/monitor/icinga  --with-nrpe-user=monitor --with-nrpe-group=monitor  --with-icinga-user=monitor --with-icinga-group=monitor --enable-command-args 

# make all

輸出如下,按自己的需求來。

*** Compile finished ***

  make install
     - This installs files in /home/monitor/icinga

  make install-plugin
     - This installs init-script files in /home/monitor/icinga/libexec

  make install-init
     - This installs init-script files in /etc/init.d

  make install-xinetd
     - This installs sample-config/nrpe.xinetd in /etc/xinit.d

  make install-init-freebsd
     - This installs init-script.freebsd files in /etc/init.d

  make install-init-debian
     - This installs init-script.debian files in /etc/init.d

  make install-init-suse
     - This installs init-script.suse files in /etc/init.d

  make install-daemon-config
     - This installs the Nrpe config file in /home/monitor/icinga/etc

# make install

# make install-plugin

# make install-init

# make install-daemon-config

八、調整SELinux策略

臨時關閉:# setenforce 0

永久關閉:

# vim /etc/sysconfig/selinux 

SELINUX=disabled

九、啟動HTTP,Icinga並添加開機自啟動

# /etc/init.d/httpd start

# /etc/init.d/icinga start

# chkconfig httpd on

# chkconfig icinga on

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 項目檢出 如果你的git還沒有代碼倉庫,可以用過git的代碼倉庫頁面新建一個你的倉庫 創建git上的倉庫後,我們還需要建立本地的倉庫,所以打開Mac終端,建立本地倉庫文件夾(這裡我用HelloC),然後進入到新建的文件夾下 mkdir HelloC cd HelloC 在git頁面中,複製你的倉庫地 ...
  • rewrite模塊名:ngx_http_rewrite_module預設自動被編譯 指令:rewrite regex replacement [flag] regex :正則表達式,用於匹配用戶請求的uri replacement:重寫後的結果 flag: last:重寫完成之後停止對當前uri的進 ...
  • 1、安裝svn客戶端 1.1、使用命令安裝 1)CentOS 2)ubuntu 1.2、源碼安裝 http://www.cnblogs.com/fengbohello/p/4142810.html 2、開啟svn服務進程 2.1、我的習慣是把代碼倉庫放在/opt/svn目錄下,所以先創建目錄/opt ...
  • 1.Gnu/Linux是一個基於POSIX和UNIX的多用戶多任務 支持多線程多CPU的類UNIX的操作系統. 繼承了UNIX以網路為核心的設計思想 是性能穩定的多用戶網路操作系統. 1991年10月5日Linus Torvalds在usenet的comp.os.minix新聞組中發佈了第一個Lin ...
  • 故宮角樓是很多攝影愛好者常去的地方,夕陽餘輝下的故宮角樓平靜而安詳。首先,瞭解一下進程的基本概念,進程在記憶體中佈局和內容。此外,還需要知道運行時是如何為動態數據結構(如鏈表和二叉樹)分配額外記憶體的。一 進程1 進程和程式進程:是一個可執行程式的實例。程式:包含一系列信息的文件,這些信息描述瞭如何在運... ...
  • 最新的教程同時針對kali linux2016最新版本的多個問題解決辦法還有一些實例利用。 下載地址:http://www.fu83.cn/thread-310-1-1.html ...
  • 1.calc:啟動計算器 2.appwiz.cpl:程式和功能 3.certmgr.msc:證書管理實用程式 4.charmap:啟動字元映射表 5.chkdsk.exe:Chkdsk磁碟檢查(管理員身份運行命令提示符) 6.cleanmgr: 打開磁碟清理工具 7.cliconfg:SQL SER ...
  • 一、Android系統架構 第一層:Linux內核 包括驅動程式,管理記憶體、進程、電源等資源的程式 第二層:C/C++代碼庫 包括Linux的.so文件以及嵌入到APK程式中的NDK代碼 第三層:Android SDK API 包括用Java編寫的各種Library 第四層:應用程式 這是程式員與非 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...