If you used a virtual machine, I recommend to start first with a bridged adapter network controller, so you don't need to go through double routing or port forwarding straight for any apt upgrade/install/update. If you were a network guru, do as you wish. The non gui server needs no resource, so 1 or 2 processor, 2 gigs of ram and 20gigs of space would be more than enough.
To copy commands into a VM, simply use SSH connection on powershell or putty:
ssh 192.168.1.55
NOTES
https://support.nagios.com/kb/article/nagios-core-installing-nagios-core-from-source-96.html#Debian
------------------------
LINUX USER DURING INSTALL:
PSWD SU : Azerty
user : DNHYPER
pswd : Azerty
-------------------------
LINUX User NAGIOS:
user: nagios
pswd: Azerty
-------------------------
WEB LOGIN (set up later):
user: nagiosadmin
pswd: Azerty
-------------------------
COMMANDS
INSTALL SUDO:
apt-get install sudo
INSTALL APACHE2 PHP ETC:
apt-get install apache2 php php-gd php-imap php-curl php-mcrypt
INSTALL PERL AND IT'S LIBRARIES:
apt-get install libxml-libxml-perl libnet-snmp-perl libperl-dev libnumber-format-perl libconfig-inifiles-perl libdatetime-perl libnet-dns-perl
INSTALL GRAPHICAL LIBRARIES:
apt-get install libpng-dev libjpeg-dev libgd-dev
INSTALL CoMPILATION UTILS of MAKE and AUTOCONF WITH OTHER UTILS:
apt-get install -y autoconf gcc libc6 make wget unzip apache2 apache2-utils php libgd-dev
apt-get install openssl libssl-dev
CREATE USER NAGIOS + PSWD:
useradd -m -p $(openssl passwd Azerty) nagios
CREATE GROUP NAGCMD:
groupadd nagcmd
Add user NAGIOS and user www-data to group NAGCMD
usermod -a -G nagcmd nagios
usermod -a -G nagcmd www-data (it is running apache2)
CREATE A DOWNLOAD DIRECTORY:
mkdir /home/nagios/downloads
DOWNLOAD NAGIOS to the DOWNLOAD DIRECTORY:
cd /home/nagios/downloads
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.1.tar.gz
DECOMPRESS ARCHIVE NAGIOS:
tar -zxvf nagios-4.5.1.tar.gz
ENTER DIRECTORY:
cd nagios-4.5.1
DEFAULT WEB ACCESS + GROUP DIRECTORY:
./configure --with-httpd-conf=/etc/apache2/sites-enabled --with-command-group=nagcmd
LAUNCH COMPILATION:
make all
CREATE NAGIOS ARBORESCENCE:
make install
INSTALL NAGIOS SERVICE:
make install-daemoninit
INSTALL NAGIOS PIPE:
make install-commandmode
INSTALL CONFIG FILES:
make install-config
INSTALL WEB-ADMIN INTERFACE:
make install-webconf
MODULES REWRITE AND CGI OF APACHE ENABLE:
a2enmod rewrite
a2enmode cgi
CONFIGURE ADMIN ACCESS NAGIOS by APACHE - user:nagiosadmin pswd:Azerty:
htpasswd -cb /usr/local/nagios/etc/htpasswd.users nagiosadmin Azerty
CONFIG the CONFIG RIGHTS to nagios USER:
chown -R nagios:nagcmd /usr/local/nagios
RESTART APACHE and START NAGIOS:
systemctl restart apache2
systemctl start nagios
--------------------------------------------------
This is what you should see:
![]() |
| GET your IP address |
![]() |
| Apache2 is running |
![]() |
| Nagios is running |
![]() |
| APACHE2 web access, by typing your ip in a browser, on the same network ! |
![]() |
| Nagios Core interface |
If you went to "Reports >> Alerts >> History" there are errors. Don't worry about it for now.








No comments:
Post a Comment