It looks like we need to update that documentation to include more of our supported distributions. The section you are referencing is for Ubuntu 20 instead of 24 so that's the issue you're running into. The native PHP version that Ubuntu 24 comes with is 8.3 so you can give it a shot with with changing the PHP command to 8.3. It may not work since it might require different packages but its worth a shot.
Thanks,
Sandor G
Hi JerryH,
Don't worry about lack of Linux knowledge. We are here to help.
It looks like you are trying to install Nagios Core now, instead of Nagios CSP? You would probably be happier with CSP, because it has a more extensive GUI.
The link for the CSP installation instructions is https://assets.nagios.com/downloads/csp/docs/Nagios-CSP-Installation-Guide.pdf (I also corrected the previously posted link, because the "." was getting added to the url, which broke it).
Please let us know if we can provide any other help!
Yes Nagios Core was my goal. The CSP has the ova file which I can't do anything with.
Hi JerryH,
Sorry for the confusion. CSP can be installed on Ubuntu 24 using the tarball. We are working on updating the CSP doc.
In the meantime, you can install CSP using the xi-2024R1.3.tar.gz and the Promotional License Key in the SLICENSE.TXT file.
To install the tarball you can use the following steps, or use the second set of instructions to download and install the latest tarball (below).
CSP tarball
cp xi-2024R1.3.tar.gz /tmp cd /tmp tar xzf xi-2024R1.3.tar.gz cd nagiosxi ./fullinstall -n
Latest CSP tarball
cd /tmp wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz tar xzf xi-latest.tar.gz cd nagiosxi ./fullinstall
If you want to continue on with Nagios Core, use these steps (minus the comments that start with #) or throw throw it in a file like install_core.sh and run it. I have successfully installed Core on Ubuntu 24, with these steps.
#!/bin/bash -e # # Install Core # # https://support.nagios.com/kb/article/nagios-core-installing-nagios-core-from-source-96.html#CentOS # # Security-Enhanced Linux # ===== Ubuntu 20.x ===== # NOT FOUND on 22 & 24 by default #sudo dpkg -l selinux* # Prerequisites sudo apt-get update # ===== Ubuntu 22.x / 24.x ===== sudo apt-get install -y autoconf gcc libc6 make wget unzip apache2 php libapache2-mod-php libgd-dev sudo apt-get install -y openssl libssl-dev # Downloading the Source cd /tmp #wget -O nagioscore.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.14.tar.gz wget -O nagioscore.tar.gz $(wget -q -O - https://api.github.com/repos/NagiosEnterprises/nagioscore/releases/latest | grep '"browser_download_url":' | grep -o 'https://[^"]*') tar xzf nagioscore.tar.gz # Compile cd /tmp/nagios-* sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled sudo make all # Create User And Group sudo make install-groups-users sudo usermod -a -G nagios www-data # Install Binaries sudo make install # Install Service / Daemon sudo make install-daemoninit # Install Command Mode sudo make install-commandmode # Install Configuration Files sudo make install-config # Install Apache Config Files sudo make install-webconf sudo a2enmod rewrite sudo a2enmod cgi # Configure Firewall # ufw may not be installed on Ubuntu 22 and lower ##sudo ufw allow Apache ##sudo ufw reload # Create nagiosadmin User Account sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin # Start Apache Web Server # ===== Ubuntu 15.x / 16.x / 17.x / 18.x / 20.x / 22.x / 24.x ===== sudo systemctl start nagios.service # Test Nagios # http://localhost/nagios # # Installing The Nagios Plugins # # Prerequisites sudo apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext # Downloading The Source cd /tmp #wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.4.6.tar.gz wget -O nagios-plugins.tar.gz $(wget -q -O - https://api.github.com/repos/nagios-plugins/nagios-plugins/releases/latest | grep '"browser_download_url":' | grep -o 'https://[^"]*') tar zxf nagios-plugins.tar.gz # Compile + Install cd /tmp/nagios-plugins-*/ sudo ./configure sudo make sudo make install # Test Plugins # http://localhost/nagios # Service / Daemon Commands # ===== Ubuntu 15.x / 16.x / 17.x / 18.x / 20.x / 22.x / 24.x ===== sudo systemctl start nagios.service sudo systemctl stop nagios.service sudo systemctl restart nagios.service sudo systemctl status nagios.service
To run as a script, do the following (after you save it in a file).
sudo chmod +x install_core.sh sudo ./install_core.sh