Nagios CentOS 3 – Setting Up Nagios
The next part of the installation is to set up Nagios ready for use which includes the following steps :-
- Setting up the password file
- Configuring the CGI file
- Configuring the nagios.cfg file
Setting Up The Password File
The first step in setting up Nagios is to create the password file which will be used to control access to the system. To create the password file perform the following steps :-
- In the command prompt execute the following command :-
htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
- When prompted enter the password desired for the nagiosadminuser
- When prompted confirm the password for the nagiosadmin user
Configuring The CGI File
The CGI file is already configured for the use of the user nagiosadmin following installation so there is nothing to change if using the default nagiosadmin user.
If you are using a different username then perform the following steps :-
- Edit the file /etc/nagios/cgi.cfg and replace all references to thenagiosadmin user with the username configured in the password file
- Check and confirm that the setting below is set to 1 :-
use_authentication=
- Save and Exit the file
Configuring The Nagios.cfg File
As with the CGI file, the nagios.cfg file is already configured for a basic installation.
The contents of the nagios.cfg file will be covered in subsequent articles as they are too in depth for this article.