Install nagios on pure ubuntu and use environment 1. System ubuntu-12.04.1-desktop-amd64.iso 2. Virtual Machine VMware®Workstation 8.0.4 build-744019 3. Remote tool xshell4 2. Installation Step 1. apt-get install ssh2. create nagiios users and user groups root @ ubuntu :~ # Useradd-s/sbin/nologin nagiosroot @ ubuntu :~ # Mkdir/usr/local/nagiosroot @ ubuntu :~ # Chown-R nagios. nagios/usr/local/nagios3. enable sendmail service 4. compile and install nagios cd/usr/local/src # Switch to the software installation directory # upload all the installation files tar-zxvf nagios-3.2.0.tar.gz cd nagios-3.2.0 /. /configure -- prefix =/usr/local/nagios make all make install # install the main program and CGI and the HTML file make install-init # in/etc/rc. d/init. create the nagios STARTUP script make install-commandmode in the d directory # configure the directory permission make install-config # install the sample file # Set the apt-get install chkconfig $ sudo ln-s/usr/ Lib/insserv/sbin/insserv chkconfig -- add nagios chkconfig -- level 35 nagios on chkconfig -- list nagios 5. install nagios plugin tar-xzvf nagios-plugins-1.4.14.tar.gz cd nagios-plugins-1.4.14 /. /configure -- prefix =/usr/local/nagiosmake make install6. install the configuration apachetar-xzvf httpd-2.0.63.tar.gz cd httpd-2.0.63 /. /configure -- prefix =/usr/local/apache2makemake install7. install phpapt-get install libxml2apt-get instal. Libxml2-dev. /configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxsapt-get install libxml2-dev. /configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxsmakemake install8. configure apacheUser nagiosGroup nagios # setting for nagiosScriptAlias/nagios/cgi-bin" /usr/local/nagios/sbin "<Directory"/usr/local/nagios/sbin "> AuthType BasicOptions ExecCGIAllowOverride NoneOrd Er allow, denyAllow from allAuthName "Nagios Access" AuthUserFile/usr/local/nagios/etc/htpasswdRequire valid-user </Directory> Alias/nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> AuthType BasicOptions NoneAllowOverride NoneOrder allow, denyAllow from allAuthName "Nagios Access" AuthUserFile/usr/local/nagios/etc/htpasswdRequire valid-user </Directory> LoadModule php5_module modul Es/libphp5.soAddType application/x-httpd-php. php. phtmlAddType applicatoin/x-httpd-php-source. phps 9. generate password/usr/local/apache2/bin/htpasswd-c/usr/local/nagios/etc/htpasswd nagios10. it is possible to start apache/usr/local/apache2/bin/apachectl start the following error occurs: configure: error: xml2-config not found. please check your libxml2 installation. apt-get install libxml2apt-get install libxml2-dev2.httpd: cocould n Ot determine the server's fully qualified domain name, using 127.0.1.1 for ServerName modify the httpd. conf file, and remove the comment to # ServerName. Vi/usr/local/apache2/conf/httpd. conf3.You don't have permission to access/nagios/on this server this is a parsing error. Check tail-f/usr/local/apache2/logs/error_log for detailed analysis, it may be a configuration file or permission issue. the error message attempt to invoke directory as script:/usr/local/nagios/share/the original share directory cannot be configured with ScriptAlias, but can only be configured with Alias