Use Nagios + Nconf to deploy the Nagios croe source code to install and install the basic environment. Software Package: For RHEL/CentOS users: yum install-y wget httpd php gcc glibc-common gdgd-devel make net-snmp openssl-devel (avoid check_http.c: 312: error: 'ssl _ version' undeclard error) for Ubuntu users: sudo apt-get install build-essential apache2 php5-gdlibgd2-xpm libgd2-xpm-dev libapache2-mod-php5 libcurl4-openssl-dev (avoid check_http.c: 312: error: 'ssl _ version' undeclard errors) Download the stable version of TAR package 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-init makeinstall-config makeinstal L-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/ht Passwd. users nagiosadmin Nagios PluginInstallation cd/tmp/nagios-plugins-1.4.15. /configure -- with-nagios-user = nagios -- with-nagios-group = nagios make install nconf web Management Configuration nagios install mysql database Apt-get installmysql-server-5.5; create Database CREATE databasenconf Create user and authorize GRANTSELECT, INSERT, UPDATE, DELETE, CREATE, DROP, alter on nconf. * to 'nconf' @ 'localhost' identified by 'nconfadmin'; number of nconf imported In the database table Mysql-u root-pnconf <INSTALL/create_datebase. SQL, place the unzipped nconf file in the/var/www/directory (apache default website file directory, you can set others) http: // 192.168.1.20/nconf. PS: here you can write a simple shell script to replace the nconf configuration file. The content is as follows :#! /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 modify the configuration according to the actual directory.