## Requirements: php5 mysql server php-mysql support perl 5.6 or higher apt-get install mysql-server php5 php5-mysql you will be prompted for a password use 'nconf' as root password for mysql ######Create a database/username/password to use for nconf###### mysql -u root -p CREATE DATABASE nconf; CREATE USER 'nconf'@'localhost' IDENTIFIED BY 'k3n3t'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON nconf.* TO 'nconf'@'localhost' IDENTIFIED BY 'k3n3t'; flush privileges; ####################### ############change to tmp directory###### # cd /tmp #######Download nconf.tgz###### wget http://downloads.sourceforge.net/project/nconf/nconf/1.3.0-0/nconf-1.3.0-0.tgz ########Extract the download to /var/www directory###### tar xzvf nconf-1.3.0-0.tgz -C /var/www #### change direcory owner to www-data(Apache user)####### chown -R www-data:www-data /var/www/nconf Now browse http://VMX.ws.nsrc.org/nconf Follow steps to install nconf ###set below database parameters#### D BHOST:localhost DBNAME:nconf DBUSER:nconf_admin DBPASS:"nconf user mysql password" Use everything else as default except NAGIOS_BIN variable to /usr/sbin/nagios3 at the end it will ask you to delete following files and directories cd /var/www/nconf rm -rf INSTALL INSTALL.php UPDATE UPDATE.php ####NAGIOS CONFIGURATION####### ######create nagios directories where nconf will copy the config files###### mkdir /etc/nagios3/global mkdir /etc/nagios3/Default_collector ##change directory permissions chown -R www-data:www-data /etc/nagios3/global chown -R www-data:www-data /etc/nagios3/Default_collector Now its time to configure nagios for nconf Open /etc/nagios3/nagios.cfg comment out all the lines that begin with cfg_dir= or cfg_file= Add following 2 lines and save file cfg_dir=/etc/nagios3/global cfg_dir=/etc/nagios3/Default_collector ##comment out below parameters in nagios.cfg cfg_file=/etc/nagios3/commands.cfg cfg_dir=/etc/nagios-plugins/config cfg_dir=/etc/nagios3/conf.d At this point you should be able to add hosts and configure services on nagios using Nconf,however nconf will not be able to restart the nagios service until we assign www-data(Apache user) permission to execute the nagios service init script. ####Assigning permissions to www-data user This is done in the sudoers file. Run the below command to open and edit the file #visudo add the below line just below root ALL=(ALL:ALL) ALL www-data ALL = NOPASSWD: /etc/init.d/nagios3 reload Now login to the nconf web UI and add a host/Add 2 the previous host from the nagios Lab ###Edit nconf deployment.ini file and uncomment the below lines by removing the preceeding semi colons### nano /var/www/nconf/config/deployment.ini [extract config] type = local source_file = "/var/www/nconf/output/NagiosConfig.tgz" target_file = "/tmp/" action = extract [copy collector config] type = local source_file = "/tmp/Default_collector/" target_file = "/etc/nagios3/Default_collector/" action = copy [copy global config] type = local source_file = "/tmp/global/" target_file = "/etc/nagios3/global/" action = copy reload_command = "sudo /etc/init.d/nagios3 reload" (add this line at the end of this column) Ensure you change the target_file to /etc/nagios3 from /etc/nagios