{"id":14022,"date":"2022-09-14T22:49:24","date_gmt":"2022-09-14T19:49:24","guid":{"rendered":"https:\/\/kifarunix.com\/?p=14022"},"modified":"2024-03-09T21:26:59","modified_gmt":"2024-03-09T18:26:59","slug":"install-nagios-server-on-oracle-linux-9","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-nagios-server-on-oracle-linux-9\/","title":{"rendered":"Install Nagios Server on Oracle Linux 9"},"content":{"rendered":"\n
In this guide, you will learn how to install Nagios Server on Oracle Linux 9. Nagios<\/a> provides enterprise-class Open Source IT monitoring, network monitoring, server and applications monitoring.<\/p>\n\n\n\n Resynchronize your system packages to their latest versions.<\/p>\n\n\n\n The default Oracle Linux repositories do not provide Nagios Core packages. As a result, in this guide, we are going to build Nagios Core from the source code. As such there are packages and build tools that you need to install. Run the command below to install them.<\/p>\n\n\n\n Navigate to the Nagios Core downloads page<\/a> and grab the latest Nagios core source code. Nagios v4.4.6 is the current stable release as of this guide.<\/p>\n\n\n\n Get the latest stable release version number and substitute the value of the $VER<\/strong> variable below and use wget to download the file.<\/p>\n\n\n\n Once the Nagios source is downloaded, extract it by running the command;<\/p>\n\n\n\n Next, navigate to the Nagios source code directory.<\/p>\n\n\n\n Run the configuration script to adapt Nagios to your system and check if all required dependencies and build tools are in place.<\/p>\n\n\n\n If the configuration is successful, you will be provided with the summary;<\/p>\n\n\n\n Next, proceed to compile Nagios Main program and CGIs.<\/p>\n\n\n\n If the main program and CGIs compiled without any errors, proceed to install Nagios Server on Oracle Linux, and its configurations.<\/p>\n\n\n\n Sample compilation output;<\/p>\n\n\n\nInstall Nagios Server on Oracle Linux 9<\/h2>\n\n\n\n
Run System Update<\/h3>\n\n\n\n
dnf update<\/code><\/pre>\n\n\n\n
Install Required Build Tools<\/h3>\n\n\n\n
dnf install gcc glibc glibc-common perl httpd php php-cli php-fpm wget net-snmp gd gd-devel openssl openssl-devel<\/code><\/pre>\n\n\n\n
Download Nagios Core Source Code<\/h3>\n\n\n\n
VER=4.4.7<\/code><\/pre>\n\n\n\n
wget https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-$VER.tar.gz<\/code><\/pre>\n\n\n\n
Extract the Nagios Source Code<\/h3>\n\n\n\n
tar xzf nagios-$VER.tar.gz<\/code><\/pre>\n\n\n\n
Installing Nagios Core<\/h3>\n\n\n\n
cd nagios-$VER\/<\/code><\/pre>\n\n\n\n
Configure Nagios Core on Oracle Linux 9<\/h4>\n\n\n\n
.\/configure<\/code><\/pre>\n\n\n\n
Creating sample config files in sample-config\/ ...\n\n\n*** Configuration summary for nagios 4.4.7 2022-04-14 ***:\n\n General Options:\n -------------------------\n Nagios executable: nagios\n Nagios user\/group: nagios,nagios\n Command user\/group: nagios,nagios\n Event Broker: yes\n Install ${prefix}: \/usr\/local\/nagios\n Install ${includedir}: \/usr\/local\/nagios\/include\/nagios\n Lock file: \/run\/nagios.lock\n Check result directory: \/usr\/local\/nagios\/var\/spool\/checkresults\n Init directory: \/lib\/systemd\/system\n Apache conf.d directory: \/etc\/httpd\/conf.d\n Mail program: \/bin\/mail\n Host OS: linux-gnu\n IOBroker Method: epoll\n\n Web Interface Options:\n ------------------------\n HTML URL: http:\/\/localhost\/nagios\/\n CGI URL: http:\/\/localhost\/nagios\/cgi-bin\/\n Traceroute (used by WAP): \n\n\nReview the options above for accuracy. If they look okay,\ntype 'make all' to compile the main program and CGIs.\n<\/code><\/pre>\n\n\n\n
Compile Nagios Core on Oracle Linux 9<\/h4>\n\n\n\n
make all<\/code><\/pre>\n\n\n\n
*** Compile finished ***\n\nIf the main program and CGIs compiled without any errors, you\ncan continue with testing or installing Nagios as follows (type\n'make' without any arguments for a list of all possible options):\n\n make test\n - This runs the test suite\n\n make install\n - This installs the main program, CGIs, and HTML files\n\n make install-init\n - This installs the init script in \/lib\/systemd\/system\n\n make install-daemoninit\n - This will initialize the init script\n in \/lib\/systemd\/system\n\n make install-groups-users\n - This adds the users and groups if they do not exist\n\n make install-commandmode\n - This installs and configures permissions on the\n directory for holding the external command file\n\n make install-config\n - This installs *SAMPLE* config files in \/usr\/local\/nagios\/etc\n You'll have to modify these sample files before you can\n use Nagios. Read the HTML documentation for more info\n on doing this. Pay particular attention to the docs on\n object configuration files, as they determine what\/how\n things get monitored!\n\n make install-webconf\n - This installs the Apache config file for the Nagios\n web interface\n\n make install-exfoliation\n - This installs the Exfoliation theme for the Nagios\n web interface\n\n make install-classicui\n - This installs the classic theme for the Nagios\n web interface\n\n\n*** Support Notes *******************************************\n\nIf you have questions about configuring or running Nagios,\nplease make sure that you:\n\n - Look at the sample config files\n - Read the documentation on the Nagios Library at:\n
Nagios Library<\/a><\/blockquote>