Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:nagios_-_epel_installation

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:nagios_-_epel_installation [2013/07/23 11:34]
klaus [Installation]
tachtler:nagios_-_epel_installation [2013/07/23 22:52] (aktuell)
klaus [Installation]
Zeile 7102: Zeile 7102:
     * ''cgi.cfg''     * ''cgi.cfg''
     * ''nagios.cmd''     * ''nagios.cmd''
-    * **optional:** ''htpasswd.users'' +    * **optional:** ''htpasswd.users''  
   * Für **größere** [[http://www.nagios.com|Nagios]]-Installation sind evtl. die [[http://www.php.net/|PHP]]-Module erforderlich:   * Für **größere** [[http://www.nagios.com|Nagios]]-Installation sind evtl. die [[http://www.php.net/|PHP]]-Module erforderlich:
     * ''php-apc'' **oder** ''php-pear-apc''     * ''php-apc'' **oder** ''php-pear-apc''
Zeile 7199: Zeile 7199:
  
 :!: **HINWEIS** - Nachfolgend sind __NUR__ die relevanten Änderungen aufgelistet: :!: **HINWEIS** - Nachfolgend sind __NUR__ die relevanten Änderungen aufgelistet:
 +<code php>
 +# cat /tmp/nagiosmobile/INSTALL.php | grep -A 2 Tachtler
 +// Tachtler
 +// default: define('TARGETDIR',"/usr/local/nagiosmobile");
 +define('TARGETDIR',"/usr/share/nagios/html/nagiosmobile");
 +--
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/objects.cache'))  //yum installs 
 +elseif(file_exists('/var/log/nagios/objects.cache'))  //yum installs 
 +--
 + // Tachtler
 + // default: $objectfile = '/var/nagios/objects.cache';
 + $objectfile = '/var/log/nagios/objects.cache';
 +--
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/status.dat'))  //yum installs 
 +elseif(file_exists('/var/log/nagios/status.dat'))  //yum installs 
 +--
 + // Tachtler
 + // default: $statusfile = '/var/nagios/status.dat';
 + $statusfile = '/var/log/nagios/status.dat';
 +--
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/rw/nagios.cmd'))  //yum install 
 +elseif(file_exists('/var/spool/nagios/cmd/nagios.cmd'))  //yum install 
 +--
 + // Tachtler
 + // default: $cgifile = '/var/nagios/rw/nagios.cmd';
 + $cgifile = '/var/spool/nagios/cmd/nagios.cmd';
 +</code>
 +
 +Zusammengefasst sind dies nachfolgende Einstellungen:
 +  * **''TARGETDIR''** --> ''/usr/share/nagios/html/nagiosmobile''
 +  * **''$objectfile''** --> ''/var/log/nagios/objects.cache''
 +  * **''$statusfile''** --> ''/var/log/nagios/status.dat''
 +  * **''$cgifile''** --> ''/etc/nagios/cgi.cfg''
 +  * **''$nagcmd''** --> ''/var/spool/nagios/cmd/nagios.cmd''
 +
 +Nachfolgend die **komplette** Installationsdatei ''/tmp/nagiosmobile/INSTALL.php'':
 +<code php>
 +#!/usr/bin/php
 +<?php
 +// Nagios Mobile 
 +// Copyright (c) 2010-2011 Nagios Enterprises, LLC.
 +// Install script written by Mike Guthrie <mguthrie@nagios.com>
 +//
 +
 +// ***********MODIFY THE DIRECTORY LOCATIONS BELOW TO MATCH YOUR NAGIOS INSTALL*********************
 +
 +//target directory where nagiosmobile's web files will be stored  
 +// Tachtler
 +// default: define('TARGETDIR',"/usr/local/nagiosmobile");
 +define('TARGETDIR',"/usr/share/nagios/html/nagiosmobile");
 +//target directory where your current apache configuration directory is located
 +define('APACHECONF',"/etc/httpd/conf.d"); 
 +//default for ubuntu/debian installs 
 +//define('APACHECONF',"/etc/apache2/conf.d"); 
 +
 +
 +
 +
 +
 +/////////////////////////////////DO NOT EDIT BELOW THIS LINE////////////////////////
 +require('include.inc.php'); 
 +
 +
 +if(isset($_SESSION)) die("You cannot run this from a web browser!");
 +
 +$errors = 0; 
 +$errorstring = ''; 
 +
 +// @TODO: modify this script to find and parse the main nagios.cfg file for all relevant information.  
 +
 +
 +////////////////////////////////////////////////apache config 
 +echo "Copying apache configuration file...\n"; 
 +$output = system('/bin/mv -f nagiosmobile_apache.conf '.APACHECONF.'/nagiosmobile.conf', $code);
 +if($code > 0) 
 +{
 + $errorstring .= "Failed to move apache configuration file nagiosmobile_apache.conf to ".APACHECONF."\n $output\n";
 + $errors++; 
 +}
 +/*  //////////////XXX TODO: conf file for nagiosmobile
 +
 +//main nagiosmobile config 
 +echo "Copying nagiosmobile configuration file...\n";
 +$output = system('/bin/cp config/nagiosmobile.conf /etc/',$code); 
 +if($code > 0)
 +{
 + $errors++;
 + $errorstring.="Failed to copy config/nagiosmobile.conf file to /etc directory \n$output\n"; 
 +}
 +*/ 
 +//////////////////////////making web directory
 +echo "Creating web directory...\n"; 
 +$output = file_exists(TARGETDIR) ? $code=0 : system('/bin/mkdir '.TARGETDIR,$code); 
 +if($code > 0)
 +{
 + $errors++;
 + $errorstring.="ERROR: Failed to create ".TARGETDIR." directory \n$output\n"; 
 +}
 +
 +echo "Copying files...\n"; 
 +$output = system('/bin/cp -rf * '.TARGETDIR.'/',$code); 
 +if($code > 0)
 +{
 + $errors++;
 + $errorstring.="ERROR: Failed to copy files to ".TARGETDIR." directory \n$output\n"; 
 +}
 +echo "Cleaning up...\n"; 
 +$output = system('/bin/rm -f '.TARGETDIR.'/INSTALL.php',$code);
 +if($code > 0)
 +{
 + $errors++;
 + $errorstring.="ERROR: Failed to delete install script from web directory \n$output\n"; 
 +}
 +system('/bin/rm -f '.TARGETDIR.'/README',$code);
 +
 +
 +$service = ''; 
 +////////////////////////look for apache init script 
 +if(file_exists('/etc/init.d/httpd'))
 + $service = '/etc/init.d/httpd'; 
 +elseif(file_exists('/etc/init.d/apache2'))
 + $service = '/etc/init.d/apache2';
 +else
 + $service =false; 
 +
 +if($service)
 +{
 + echo "Restarting apache...\n"; 
 + $output = system($service." restart",$code); 
 + if($code > 0)
 + {
 + $errors++;
 + $errorstring.="ERROR: Failed to restart apache, please restart apache manually \n$output\n"; 
 + }
 +}
 +else 
 +{
 + $errors++;
 + $errorstring.="ERROR: Failed to restart apache, please restart apache manually \n$output\n"; 
 +}
 +
 +echo "Checking for file locations...\n"; 
 +
 +$change = "***Update this location in your ".TARGETDIR."/include.inc.php file***\n"; 
 +////////////////////////////////look for object.cache file
 +$objectfile = $OBJECTS_FILE; //source installs 
 +if(file_exists($objectfile))
 +{
 + //echo "Objects file found at: $objectfile\n"; 
 +}
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/objects.cache'))  //yum installs 
 +elseif(file_exists('/var/log/nagios/objects.cache'))  //yum installs 
 +{
 + // Tachtler
 + // default: $objectfile = '/var/nagios/objects.cache';
 + $objectfile = '/var/log/nagios/objects.cache';
 + echo "NOTICE: Objects file found at: $objectfile\n" . $change;
 +}
 +elseif(file_exists('/var/cache/nagios3/objects.cache'))  //ubuntu debian nagios3 installs 
 +{
 + $objectfile = '/var/cache/nagios3/objects.cache';
 + echo "NOTICE: Objects file found at: $objectfile\n" . $change;
 +}
 +else
 +{
 + echo "NOTICE: objects.cache file not found.  Please specify the location of this file in your ".TARGETDIR."/include.inc.php file\n"; 
 + $objectfile = false; 
 +}
 +
 +/////////////////////look for status.dat file
 +$statusfile = $STATUS_FILE; //source installs 
 +if(file_exists($statusfile))
 +{
 + //echo "Status file found at: $statusfile\n"; 
 +}
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/status.dat'))  //yum installs 
 +elseif(file_exists('/var/log/nagios/status.dat'))  //yum installs 
 +{
 + // Tachtler
 + // default: $statusfile = '/var/nagios/status.dat';
 + $statusfile = '/var/log/nagios/status.dat';
 + echo "NOTICE: Status file found at: $statusfile\n" . $change;
 +
 +}
 +elseif(file_exists('/var/cache/nagios3/status.dat'))  //ubuntu debian nagios3 installs 
 +{
 + $statusfile = '/var/cache/nagios3/status.dat';
 + echo "NOTICE: Status file found at: $statusfile\n" . $change;
 +}
 +else
 +{
 + echo "NOTICE: status.dat file not found.  Please specify the location of this file in your ".TARGETDIR."/include.inc.php file\n"; 
 + $statusfile = false; 
 +}
 +
 +/////////////////look for cgi.cfg file
 +$cgifile = $CGI_FILE;  //source installs 
 +if(file_exists($cgifile))
 +{
 + //echo "cgi.cfg file found at: $cgifile\n"; 
 +}
 +elseif(file_exists('/etc/nagios/cgi.cfg'))  //yum installs 
 +{
 + $cgifile = '/etc/nagios/cgi.cfg';
 + echo "NOTICE: cgi.cfg file found at: $cgifile\n" . $change;
 +}
 +elseif(file_exists('/etc/nagios3/cgi.cfg'))  //ubuntu/debian nagios3 installs 
 +{
 + $cgifile = '/etc/nagios3/cgi.cfg';
 + echo "NOTICE: cgi.cfg file found at: $cgifile\n" . $change;
 +}
 +else
 +{
 + echo "NOTICE: cgi.cfg file not found.  Please specify the location of this file in your ".TARGETDIR."/include.inc.php file\n"; 
 + $objectfile = false; 
 +}
 +
 +
 +////////////////////////////////////look for nagios.cmd file 
 +$nagcmd = $COMMAND_FILE;  //source install
 +if(file_exists($nagcmd)) 
 +{
 + //echo "Nagios cmd file found at: $nagcmd\n"; 
 +}
 +// Tachtler
 +// default: elseif(file_exists('/var/nagios/rw/nagios.cmd'))  //yum install 
 +elseif(file_exists('/var/spool/nagios/cmd/nagios.cmd'))  //yum install 
 +{
 +        // Tachtler
 + // default: $cgifile = '/var/nagios/rw/nagios.cmd';
 + $cgifile = '/var/spool/nagios/cmd/nagios.cmd';
 + echo "NOTICE: Nagios cmd file found at: $nagcmd\n". $change;
 +}
 +elseif(file_exists('/var/lib/nagios3/rw/nagios.cmd'))  //ubuntu/debian nagios3 
 +{
 + $nagcmd = '/var/lib/nagios3/rw/nagios.cmd';
 + echo "NOTICE: Nagios cmd file found at: $nagcmd\n". $change;
 +}
 +else
 +{
 + echo "NOTICE: nagios.cmd file not found.  Please specify the location of this file in your ".TARGETDIR."/include.inc.php file\n"; 
 + $nagcmd = false; 
 +}
 +
 +
 +
 +//all done
 +echo "Script Complete!\n"; 
 +exit($errors); 
 +
 +
 +?>
 +</code>
 +
 +Abschließend kann nun die **eigentliche Installation** durchgeführt werden.
 +
 +Hierbei werden nachfolgende Schritte automatisch durch die Installationsdatei ausgeführt:
 +  * Anlegen des Ziel-Verzeichnisses
 +  * Kopieren der benötigten Dateien, in das neu angelegte Ziel-Verzeichnis
 +  * Erstellen und kopieren einer **vhost-Konfigurationsdatei** für den [[http://httpd.apache.org|Apache HTTPD Webserver]]
 +  * Neustart des [[http://httpd.apache.org|Apache HTTPD Webserver]]
 +
 +Falls einer dieser Schritte unerwünscht sein sollte, kann die Installationsdatei entsprechend angepasst werden.
 +
 +:!: **HINWEIS** - **Nachfolgend wurde der Neustart des [[http://httpd.apache.org|Apache HTTPD Webserver]] auskommentiert!**
 +
 +Nachfolgender Befehl, führt die Installation aus:
 <code> <code>
 +# /tmp/nagiosmobile/INSTALL.php 
 +Copying apache configuration file...
 +Creating web directory...
 +Copying files...
 +Cleaning up...
 +Checking for file locations...
 +NOTICE: Objects file found at: /var/log/nagios/objects.cache
 +***Update this location in your /usr/share/nagios/html/nagiosmobile/include.inc.php file***
 +NOTICE: Status file found at: /var/log/nagios/status.dat
 +***Update this location in your /usr/share/nagios/html/nagiosmobile/include.inc.php file***
 +NOTICE: cgi.cfg file found at: /etc/nagios/cgi.cfg
 +***Update this location in your /usr/share/nagios/html/nagiosmobile/include.inc.php file***
 +NOTICE: Nagios cmd file found at: /usr/local/nagios/var/rw/nagios.cmd
 +***Update this location in your /usr/share/nagios/html/nagiosmobile/include.inc.php file***
 +Script Complete!
 +</code>
  
 +==== Konfiguration: /usr/share/nagios/html/nagiosmobile/include.inc.php ====
 +
 +Nach der erfolgreichen Installation durch die Installationsdatei ''/tmp/nagiosmobile/INSTALL.php'', kann mit nachfolgendem Befehl in des Installationsverzeichnis gewechselt werden
 +<code>
 +# cd /usr/share/nagios/html/nagiosmobile
 </code> </code>
 +und der Inhalt des nue entstandenen Verzeichnisses mit nachfolgendem Befehl aufgelistet werden:
 +<code>
 +# ls -la /usr/share/nagios/html/nagiosmobile
 +total 68
 +drwxr-xr-x  6 root root 4096 Jul 23 14:03 .
 +drwxrwxr-x 12 root root 4096 Jul 23 14:03 ..
 +-rwxr-xr-x  1 root root  493 Jul 23 14:03 CHANGES
 +drwxr-xr-x  2 root root 4096 Jul 23 14:03 class
 +-rwxr-xr-x  1 root root   68 Jul 23 14:03 footer.inc.php
 +-rwxr-xr-x  1 root root 4978 Jul 23 14:03 header.inc.php
 +-rwxr-xr-x  1 root root 4448 Jul 23 14:03 include.inc.php
 +drwxr-xr-x  2 root root 4096 Jul 23 14:03 includes
 +-rwxr-xr-x  1 root root 5385 Jul 23 14:03 index.php
 +drwxr-xr-x  3 root root 4096 Jul 23 14:03 jquery.mobile-1.0
 +drwxr-xr-x  2 root root 4096 Jul 23 14:03 js
 +-rwxr-xr-x  1 root root 1423 Jul 23 14:03 nagiosmobile.css
 +-rwxr-xr-x  1 root root 3631 Jul 23 14:03 nagios.png
 +-rwxr-xr-x  1 root root 2984 Jul 23 14:03 TODO.txt
 +</code>
 +
 +Hier befindet sich die Konfigurationsdatei
 +  * **''/usr/share/nagios/html/nagiosmobile/include.inc.php''**
 +
 +Hier müssen, leider **nochmals** einige Pfade angepasst werden.
 +
 +  * **''$STATUS_FILE''** = ''/var/log/nagios/status.dat''
 +  * **''$COMMAND_FILE''** = ''/var/spool/nagios/cmd/nagios.cmd''
 +  * **''$CGI_FILE''** = ''/etc/nagios/cgi.cfg''
 +  * **''$OBJECTS_FILE''** = ''/var/log/nagios/objects.cache''
 +
 +:!: **HINWEIS** - Nachfolgend sind __NUR__ die relevanten Änderungen aufgelistet:
 +<code php>
 +# cat /usr/share/nagios/html/nagiosmobile/include.inc.php | grep -A 2 Tachtler
 +// Tachtler
 +// default: $STATUS_FILE  = "/usr/local/nagios/var/status.dat";
 +$STATUS_FILE  = "/var/log/nagios/status.dat";
 +// Tachtler
 +// default: $COMMAND_FILE = "/usr/local/nagios/var/rw/nagios.cmd";
 +$COMMAND_FILE = "/var/spool/nagios/cmd/nagios.cmd";
 +// Tachtler
 +// default: $CGI_FILE = "/usr/local/nagios/etc/cgi.cfg";
 +$CGI_FILE = "/etc/nagios/cgi.cfg";
 +// Tachtler
 +// default: $OBJECTS_FILE = "/usr/local/nagios/var/objects.cache"; 
 +$OBJECTS_FILE = "/var/log/nagios/objects.cache";
 +</code>
 +
 +Nachfolgend die **komplette** Konfigurationsdatei ''/usr/share/nagios/html/nagiosmobile/include.inc.php'':
 +<code php>
 +<?php 
 +// include.inc.php 
 +// main include file for all global variables, constants, and script includes
 +// @author Mike Guthrie
 +// @author Hirose Masaaki
 +
 +
 +//////////////////FILE LOCATIONS:  EDIT THESE TO MATCH YOUR NAGIOS INSTALLATION//////
 +////////////////////////////////////////////////////////////////////////////////////
 +// Tachtler
 +// default: $STATUS_FILE  = "/usr/local/nagios/var/status.dat";
 +$STATUS_FILE  = "/var/log/nagios/status.dat";
 +// Tachtler
 +// default: $COMMAND_FILE = "/usr/local/nagios/var/rw/nagios.cmd";
 +$COMMAND_FILE = "/var/spool/nagios/cmd/nagios.cmd";
 +// Tachtler
 +// default: $CGI_FILE = "/usr/local/nagios/etc/cgi.cfg";
 +$CGI_FILE = "/etc/nagios/cgi.cfg";
 +// Tachtler
 +// default: $OBJECTS_FILE = "/usr/local/nagios/var/objects.cache"; 
 +$OBJECTS_FILE = "/var/log/nagios/objects.cache"; 
 +$BASE_URL = '/nagiosmobile';
 +$TTL = 30; //Time to live for cached data parsed from status and objects file 
 +$USER = ''; //you can hard-code the 'nagiosadmin' if you don't want any authentication: NOT RECOMMENDED!! 
 +///////////////////////////////////////////////////////////////////////////////////
 +////////////////////DO NOT MAKE CHANGES BELOW THIS LINE/////////////////////////////
 +
 +
 +// Nagios Mobile 1.0
 +// Copyright (c) 2011 Nagios Enterprises, LLC
 +// Web: http://www.nagios.com/products/nagiosmobile
 +// Developed by Mike Guthrie and Wesley Zhao.  
 +// Based on Teeny Nagios by HIROSE Masaaki. 
 +
 +// LICENSE:
 +//
 +// This work is made available to you under the terms of Version 2 of
 +// the GNU General Public License. A copy of that license should have
 +// been provided with this software, but in any event can be obtained
 +// from http://www.fsf.org.
 +// 
 +// This work is distributed in the hope that it will be useful, but
 +// WITHOUT ANY WARRANTY; without even the implied warranty of
 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 +// General Public License for more details.
 +// 
 +// You should have received a copy of the GNU General Public License
 +// along with this program; if not, write to the Free Software
 +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 +// 02110-1301 or visit their web page on the internet at
 +// http://www.fsf.org.
 +//
 +//
 +// CONTRIBUTION POLICY:
 +//
 +// (The following paragraph is not intended to limit the rights granted
 +// to you to modify and distribute this software under the terms of
 +// licenses that may apply to the software.)
 +//
 +// Contributions to this software are subject to your understanding and acceptance of
 +// the terms and conditions of the Nagios Contributor Agreement, which can be found 
 +// online at:
 +//
 +// http://www.nagios.com/legal/contributoragreement/
 +//
 +//
 +// DISCLAIMER:
 +//
 +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 +// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 +// HOLDERS BE LIABLE FOR ANY CLAIM FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
 +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
 +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR OTHER
 +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, STRICT LIABILITY, TORT (INCLUDING 
 +// NEGLIGENCE OR OTHERWISE) OR OTHER ACTION, ARISING FROM, OUT OF OR IN CONNECTION 
 +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 +
 +
 +//////////INCLUDES
 +require_once('includes/functions.inc.php'); 
 +require_once('includes/displayfunctions.inc.php');
 +require_once('includes/parse_cgi_file.inc.php'); 
 +require_once('includes/parse_objects_file.inc.php');
 +require_once('includes/parse_status_file.inc.php');
 +require_once('class/NagiosUser.php');
 +require_once('class/NagiosData.php');
 +
 +///////////CONSTANTS
 +define("TN_VERSION", "1.03");
 +define("HOST_UP",          0);
 +define("HOST_DOWN",        1);
 +define("HOST_UNREACHABLE", 2);
 +define("STATE_OK",       0);
 +define("STATE_WARNING",  1);
 +define("STATE_CRITICAL", 2);
 +define("STATE_UNKNOWN",  3);
 +define("CHILD_PROBLEM", 99); 
 +
 +$HOST_STATUS_BY = array(
 +                        HOST_UP          => "Up",
 +                        HOST_DOWN        => "Down",
 +                        HOST_UNREACHABLE => "Unreachable",
 +                        );
 +$SERVICE_STATUS_BY = array(
 +                           STATE_OK       => "OK",
 +                           STATE_WARNING  => "Warning",
 +                           STATE_CRITICAL => "Critical",
 +                           STATE_UNKNOWN  => "Unknown",
 +                           );
 +
 +//////APC
 +//use apc if we've got it 
 +$APC = (function_exists('apc_add') && function_exists('apc_fetch') && function_exists('apc_exists')) ? true : false; 
 + 
 +
 +
 +?>
 +</code>
 +
 +==== Konfiguration: /etc/httpd/conf.d/vhost ====
 +
 +:!: **HINWEIS** - Bevor ein erster Start von [[http://www.nagios.com/products/nagiosmobile|Nagios Mobile]] durchgeführt werden kann, soll die Einrichtung des Webservers, hier der [[http://httpd.apache.org/|Apache HTTP Server]], statt finden, da sonst evtl. Konfigurationen nicht im Web-Interface von [[http://www.nagios.com/products/nagiosmobile|Nagios Mobile]] dargestellt werden können!
 +
 +Hier soll die Konfiguration eines **virtuellen Host** für den [[http://httpd.apache.org/|Apache HTTP Server]] beschrieben werden. Der Aufruf von [[http://www.nagios.com/products/nagiosmobile|Nagios Mobile]] soll über die URL
 +  * http://www.nagiosmobile.tachtler.net
 +ermöglicht werden.
 +
 +:!: **HINWEIS** - Falls Sie noch keine Erfahrungen mit **virtuellen Hosts** in Verbindung mit dem [[http://httpd.apache.org/|Apache HTTP Server]] haben sollten, lesen Sie bitte die Dokumentation des //Apache HTTP Server Projektes//, da hier nur die grundlegenden Schritte erläutert werden.
 +
 +Falls noch nicht geschehen wird im Verzeichnis ''/etc/httpd/conf.d'' eine Datei mit dem Namen ''vhosts.conf'' erstellt. Der Inhalt dieser Datei sollte minimal für einen **virtuellen Host** für [[http://www.nagios.com/products/nagiosmobile|Nagios Mobile]] wie folgt aussehen:
 +<code apache>
 +# This configuration file enables the vhosts to this
 +# Server
 +#
 +
 +NameVirtualHost *:80
 +
 +#
 +# nagiosmobile.tachtler.net (Nagios Monitoring)
 +#
 +<VirtualHost *:80>
 +        ServerAdmin webmaster@tachtler.net
 +        ServerName nagiosmobile.tachtler.net
 +        ServerAlias www.nagiosmobile.tachtler.net
 +        ServerPath /
 +
 +        Alias /nagiosmobile "/usr/share/nagios/html/nagiosmobile"
 +
 +        <Directory "/usr/share/nagios/html/nagiosmobile">
 +                AllowOverride None
 +                Order allow,deny
 +                Allow from all
 +                #
 +                # Use the same value as defined in nagios.conf
 +                #
 +                AuthName "Nagios Mobile Access"
 +                AuthType Basic
 +                AuthUserFile /etc/nagios/passwd
 +                Require valid-user
 +        </Directory>
 +
 +        DirectoryIndex index.html index.php
 +        ErrorLog logs/nagiosmobile_error.log
 +        CustomLog logs/nagiosmobile_access.log combined
 +</VirtualHost>
 +</code>
 +
 +:!: **WICHTIG** - **//Die mit der Installation mitgelieferte Konfigurationsdatei ''/etc/httpd/conf.d/nagiosmobile.conf'' kann entweder gelöscht, oder besser deren Inhalt "auskommentiert" werden, damit es mit diesem neuen virtuellen Host nicht zu Überschneidungen kommen kann!//**
 +
 +Ein erneuter oder erster Start des [[http://httpd.apache.org/|Apache HTTP Server]] mit folgenden Befehl für eine erstmaligen Start
 +<code>
 +# service httpd start
 +</code>
 +oder einen erneuten Start des [[http://httpd.apache.org/|Apache HTTP Server]] mit folgendem Befehl
 +<code>
 +# service httpd restart
 +</code>
 +macht die oben beschriebenen Konfigurationen für den [[http://httpd.apache.org/|Apache HTTP Server]] wirksam.
 +
 +Nach dem Erfolgreichen Aufruf des Links [[http://www.nagiosmobile.tachtler.net|http://www.nagiosmobile.tachtler.net]] sollte folgende Standard-Startseite erscheinen:
 +
 +{{:tachtler:nagios:screenshot_nagiosmobile.png|Nagios Mobile - Bildschirmkopie}}
 +
tachtler/nagios_-_epel_installation.1374572063.txt.gz · Zuletzt geändert: 2013/07/23 11:34 von klaus