Comments on: How to Install Nagios 4 in Ubuntu and Debian https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 05 Mar 2021 18:05:53 +0000 hourly 1 By: Aditya Thombre https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/comment-page-1/#comment-1445467 Fri, 05 Mar 2021 18:05:53 +0000 https://www.tecmint.com/?p=27785#comment-1445467 In reply to Ram.

Hi Ram,

You need to enable the Rewrite module before editing the config file.

Please try the below command for enabling Rewrite Module.

$ sudo a2enmod rewrite
]]>
By: Ram https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/comment-page-1/#comment-1402296 Fri, 18 Dec 2020 17:36:34 +0000 https://www.tecmint.com/?p=27785#comment-1402296 In reply to retalsw.

Hi team,

I have given as :

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*) https://%{3.135.189.159}/$1

But getting the below error

Job for apache2.service failed because the control process exited with an error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

when I run the journalctl | tail    I get the below error.
Dec 18 17:22:07 polkit-1 sshd[12867]: Disconnected from invalid user diradmin 81
Dec 18 17:25:12 polkit-1 systemd[1]: Starting The Apache HTTP Server...
Dec 18 17:25:12 polkit-1 apachectl[12881]: AH00526: Syntax error on line 14 of /
Dec 18 17:25:12 polkit-1 apachectl[12881]: Invalid command 'RewriteEngine', perh
Dec 18 17:25:12 polkit-1 apachectl[12881]: Action 'start' failed.
Dec 18 17:25:12 polkit-1 apachectl[12881]: The Apache error log may have more in
Dec 18 17:25:12 polkit-1 systemd[1]: apache2.service: Control process exited, co
Dec 18 17:25:12 polkit-1 systemd[1]: apache2.service: Failed with result 'exit-c
Dec 18 17:25:12 polkit-1 systemd[1]: Failed to start The Apache HTTP Server.
Dec 18 17:25:59 polkit-1 sshd[12930]: Connection closed by 127.0.0.1 port 50260
]]>
By: Tony https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/comment-page-1/#comment-1402148 Fri, 18 Dec 2020 00:30:32 +0000 https://www.tecmint.com/?p=27785#comment-1402148 Install by compilation is not the Debian way. You have unmaintained, not updateable software this way, basically a hack.

You teach the others to do this wrong way, which if a vulnerability is found will leave them unpatched if they rely on apt-get for updates.

]]>
By: ngs https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/comment-page-1/#comment-1379619 Fri, 23 Oct 2020 12:02:22 +0000 https://www.tecmint.com/?p=27785#comment-1379619 Please stop compiling source code if there is a ready-made nagios4 package, it makes things needlessly overcomplicated!

]]>
By: Thevarx https://www.tecmint.com/install-nagios-core-in-ubuntu-and-debian/comment-page-1/#comment-995997 Thu, 24 May 2018 05:38:37 +0000 https://www.tecmint.com/?p=27785#comment-995997 A simple script to install Nagios Monitoring Tool on Ubuntu and Debian systems.

#!/bin/sh

apt update
apt-get install wget build-essential apache2 php apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagios, nagcmd www-data

cd ~
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.0.tar.gz
tar -zxvf nagios-4.2.0.tar.gz
cd nagios-4.2.0
./configure --with-nagios-group=nagios --with-command-group=nagcmd
make all
make install
make install-commandmode
make install-init
make install-config
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/site-available/nagios.conf

cp -R contrib//eventhandlers/ /usr/local/nagios/libexew
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers

cd ~
wget https://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz
tar -zxvf nagios-plugins-2.1.2.tar.gz
cd nagios-plugins-2.1.2

./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
make
make install
]]>