Nagios+Nconf部署

來源:互聯網
上載者:User

Nagios+Nconf部署 Nagios croe 源碼安裝  安裝基本環境,軟體包:For RHEL/CentOS users: yum install -y wget httpd php gcc glibc glibc-common gdgd-devel make net-snmp openssl-devel (避免 check_http.c:312:error:’ssl_version’undeclard 錯誤) For Ubuntu users: sudo apt-get install build-essential apache2 php5-gdlibgd2-xpm libgd2-xpm-dev libapache2-mod-php5 libcurl4-openssl-dev(避免 check_http.c:312:error:’ssl_version’undeclard 錯誤)   官網下載穩定版TAR包  Adding the NagiosUser and Group Next add theappropriate user and group for the Nagios process to run: useradd nagios groupadd nagcmd usermod -a -Gnagcmd nagios   For RHEL/CentOSusers: ./configure--with-command-group=nagcmd For Ubuntu users: ./configure--with-nagios-group=nagios --with-command-group=nagcmd   All systems: make all make install make install-init makeinstall-config makeinstall-commandmode makeinstall-webconf cp -Rcontrib/eventhandlers/ /usr/local/nagios/libexec/ chown -Rnagios:nagios /usr/local/nagios/libexec/eventhandlers /usr/local/nagios/bin/nagios-v /usr/local/nagios/etc/nagios.cfg /etc/init.d/nagiosstart For RHEL/CentOSusers: /etc/init.d/httpdstart   Create a DefaultUser for Web Access. Add a default userfor Web Interface Access: htpasswd –c/usr/local/nagios/etc/htpasswd.users nagiosadmin     Nagios PluginInstallation cd/tmp/nagios-plugins-1.4.15 ./configure--with-nagios-user=nagios --with-nagios-group=nagios make make install     安裝 nconf web管理配置nagios安裝mysql 資料庫Apt-get installmysql-server-5.5 php5-mysq; 建立資料庫 Create databasenconf 建立使用者並授權設定密碼 GRANTSELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON nconf.* to ‘nconf’@’localhost’identified by ‘nconfadmin’; 匯入nconf 內建資料庫表 Mysql –u root –pnconf < INSTALL/create_datebase.sql   把解壓的nconf 放在 /var/www/ 目錄下 (apache預設網站檔案目錄,可設定其他) http://192.168.1.20/nconf 開始設定 nconf參數 完畢。   PS:這裡可以寫個shell簡單指令碼,來完成nconf設定檔替換的工作,內容如下: #!/bin/bash export PATH cp -p/var/www/nconf/output/NagiosConfig.tgz /usr/local/nagios/etc/ rm -r/usr/local/nagios/etc/Default_collector /usr/local/nagios/etc/global cd/usr/local/nagios/etc/ tar -xvf/usr/local/nagios/etc/NagiosConfig.tgz /etc/init.d/nagiosrestart   根據自己的實際目錄更改此配置。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.