شرح Nagios Install Configure
-------------------------------
sudo apt-get install build-essential apache2 php openssl perl make php-gd libgd-dev libapache2-mod-php libperl-dev libssl-dev wget apache2-utils unzip
User and group configuration:
sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -a -G nagcmd www-data
Download and extract the Nagios core:
sudo wget https://assets.nagios.com/downloads/n...
sudo tar -zxvf nagios-4.4.2.tar.gz
sudo rm nagios-4.4.2.tar.gz
cd nagios-4.4.2/
sudo ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-httpd_conf=/etc/apache2/sites-enabled/
sudo make all
sudo make install
sudo make install-init
sudo make install-config
sudo make install-commandmode
sudo make install-webconf
Make admin password:
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Enable Apache modules:
sudo a2enmod cgi
Restart Apache:
sudo systemctl restart apache2
Download and Install Nagios Plugins:
sudo wget https://nagios-plugins.org/download/n...
sudo tar -zxvf nagios-plugins-2.2.1.tar.gz
Compile and install the plugins:
sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagios
sudo make
sudo make install
Verify the sample Nagios configuration files:
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Enable Nagios to start automatically at system startup:
sudo systemctl enable nagios
sudo systemctl start nagios
Access Nagios Web Interface:
http://ip-address/nagios/