Prerequisites
For RHEL/CentOS users:
1 |
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp |
Download Nagios Core and Nagios Plugins Tarballs
For all systems, run the following commands in your terminal:
1 |
cd /tmp |
Adding the Nagios User and Group
Next add the appropriate user and group for the Nagios process the run:
1 |
useradd nagios |
Nagios Core Installation
1 |
tar zxvf nagios-4.1.1.tar.gz |
Change to the New Nagios directory and install the packages:
1 |
cd nagios-4.1.1 |
For RHEL/CentOS users:
1 |
./configure --with-command-group=nagcmd |
All systems:
1 |
make all |
For RHEL/CentOS users:
1 |
/etc/init.d/httpd start |
Create a Default User for Web Access.
Add a default user for Web Interface Access:
1 |
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin |
Nagios Plugin Installation
1 |
cd /tmp/nagios-plugins-2.1.1 |
Nagios Service Setup
The following commands will register the Nagios daemon to be run upon system startup.
1 |
chkconfig --add nagios |
Nagios Web Interface
After correctly following the procedures you should now be abel to access your Nagios Core installation from a web browser.
Simply use the following:
1 |
http://<your.nagios.server.ip>/nagios |
And log in with credentials you chose when adding the nagiosadmin user to the htpasswd.users file.
近期评论