~ubuntu-branches/ubuntu/trusty/nagios3/trusty

« back to all changes in this revision

Viewing changes to html/docs/quickstart-fedora.html

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt
  • Date: 2009-08-16 14:14:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090816141423-efjzq1r3jekwd7l7
Tags: 3.2.0-1
* New upstream release (Closes: #542957)
  - Timeperiods should work as expected now (Closes: #539882)
  - Recovery notifications fixed (Closes: #543657)
* Update standards version 
  - Add README.source
* Manpage errors fixed (Closes: #540554)
* Split up the webfrontend into its own package (Closes: #479338, #485466)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
 
 
3
 
<html>
4
 
<head>
5
 
<title>Fedora Quickstart</title>
6
 
 
7
 
<STYLE type="text/css">
8
 
<!--
9
 
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
10
 
        .PageTitle { font-family: verdana,arial,serif; font-size: 16pt; font-weight: bold; }
11
 
-->      
12
 
</STYLE>
13
 
 
14
 
</head>
15
 
 
16
 
<body bgcolor="#FFFFFF" text="black" class="Default">
17
 
 
18
 
<div align="center">
19
 
<img src="images/nagios.jpg" border="0" alt="Nagios" title="Nagios">
20
 
<h1 class="PageTitle">Fedora Quickstart</h1>
21
 
</div>
22
 
 
23
 
<hr>
24
 
 
25
 
<p>
26
 
<img src="images/upto.gif" border="0" align="middle" alt="Up To" title="Up To">Up To: <a href="toc.html">Contents</a><br>
27
 
<img src="images/seealso.gif" border="0" align="middle" alt="See Also" title="See Also"> See Also: <a href="quickstart.html">Quickstart Installation Guides</a>, <a href="security.html">Security Considerations</a>
28
 
</p>
29
 
 
30
 
<p>
31
 
<strong><u>Introduction</u></strong>
32
 
</p>
33
 
 
34
 
<p>
35
 
This guide is intended to provide you with simple instructions on how to install Nagios from source (code) on Fedora and have it monitoring your local machine inside of 20 minutes.  No advanced installation options are discussed here - just the basics that will work for 95% of users who want to get started.
36
 
</p>
37
 
 
38
 
<p>
39
 
These instructions were written based on a standard <b>Fedora Core 6</b> Linux distribution.
40
 
</p>
41
 
 
42
 
<p>
43
 
<strong><u>What You'll End Up With</u></strong>
44
 
</p>
45
 
 
46
 
<p>
47
 
If you follow these instructions, here's what you'll end up with:
48
 
</p>
49
 
 
50
 
<ul>
51
 
<li>Nagios and the plugins will be installed underneath /usr/local/nagios</li>
52
 
<li>Nagios will be configured to monitor a few aspects of your local system (CPU load, disk usage, etc.)</li>
53
 
<li>The Nagios web interface will be accessible at http://localhost/nagios/</li>
54
 
</ul>
55
 
 
56
 
<p>
57
 
<strong><u>Prerequisites</u></strong>
58
 
</p>
59
 
 
60
 
<p>
61
 
During portions of the installation you'll need to have <b>root</b> access to your machine.
62
 
</p>
63
 
 
64
 
<p>
65
 
Make sure you've installed the following packages on your Fedora installation before continuing. 
66
 
</p>
67
 
 
68
 
<ul>
69
 
<li>Apache</li>
70
 
<li>GCC compiler</li>
71
 
<li><a href="http://www.boutell.com/gd/">GD</a> development libraries</li>
72
 
</ul>
73
 
 
74
 
<p>
75
 
You can use <i>yum</i> to install these packages by running the following commands (as root):
76
 
</p>
77
 
 
78
 
<pre>
79
 
yum install httpd
80
 
yum install gcc
81
 
yum install glibc glibc-common
82
 
yum install gd gd-devel
83
 
</pre>
84
 
 
85
 
<p>
86
 
<strong><u>1) Create Account Information</u></strong>
87
 
</p>
88
 
 
89
 
<p>
90
 
Become the root user.
91
 
</p>
92
 
 
93
 
<pre>
94
 
su -l
95
 
</pre>
96
 
 
97
 
<p>
98
 
Create a new <i>nagios</i> user account and give it a password.
99
 
</p>
100
 
 
101
 
<pre>
102
 
/usr/sbin/useradd -m nagios
103
 
passwd nagios
104
 
</pre>
105
 
 
106
 
<p>
107
 
Create a new <i>nagcmd</i> group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.
108
 
</p>
109
 
 
110
 
<pre>
111
 
/usr/sbin/groupadd nagcmd
112
 
/usr/sbin/usermod -a -G nagcmd nagios
113
 
/usr/sbin/usermod -a -G nagcmd apache
114
 
</pre>
115
 
 
116
 
<p>
117
 
<strong><u>2) Download Nagios and the Plugins</u></strong>
118
 
</p>
119
 
 
120
 
<p>
121
 
Create a directory for storing the downloads.
122
 
</p>
123
 
 
124
 
<pre>
125
 
mkdir ~/downloads
126
 
cd ~/downloads
127
 
</pre>
128
 
 
129
 
<p>
130
 
Download the source code tarballs of both Nagios and the Nagios plugins (visit <a href="http://www.nagios.org/download/">http://www.nagios.org/download/</a> for links to the latest versions).  At the time of writing, the latest versions of Nagios and the Nagios plugins were 3.0.3 and 1.4.11, respectively.
131
 
</p>
132
 
 
133
 
<pre>
134
 
wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz
135
 
wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
136
 
</pre>
137
 
 
138
 
<p>
139
 
<strong><u>3) Compile and Install Nagios</u></strong>
140
 
</p>
141
 
 
142
 
<p>
143
 
Extract the Nagios source code tarball.
144
 
</p>
145
 
 
146
 
<pre>
147
 
cd ~/downloads
148
 
tar xzf nagios-3.0.6.tar.gz
149
 
cd nagios-3.0.6
150
 
</pre>
151
 
 
152
 
<p>
153
 
Run the Nagios configure script, passing the name of the group you created earlier like so:
154
 
</p>
155
 
 
156
 
<pre>
157
 
./configure --with-command-group=nagcmd
158
 
</pre>
159
 
 
160
 
<p>
161
 
Compile the Nagios source code.
162
 
</p>
163
 
 
164
 
<pre>
165
 
make all
166
 
</pre>
167
 
 
168
 
<p>
169
 
Install binaries, init script, sample config files and set permissions on the external command directory.
170
 
</p>
171
 
 
172
 
<pre>
173
 
make install
174
 
make install-init
175
 
make install-config
176
 
make install-commandmode
177
 
</pre>
178
 
 
179
 
<p>
180
 
Don't start Nagios yet - there's still more that needs to be done...
181
 
</p>
182
 
 
183
 
<p>
184
 
<strong><u>4) Customize Configuration</u></strong>
185
 
</p>
186
 
 
187
 
<p>
188
 
Sample <a href="config.html">configuration files</a> have now been installed in the <i>/usr/local/nagios/etc</i> directory.  These sample files should work fine for getting started with Nagios.  You'll need to make just one change before you proceed...
189
 
</p>
190
 
 
191
 
<p>
192
 
Edit the <i>/usr/local/nagios/etc/objects/contacts.cfg</i> config file with your favorite editor and change the email address associated with the <i>nagiosadmin</i> contact definition to the address you'd like to use for receiving alerts.
193
 
</p>
194
 
 
195
 
<pre>
196
 
vi /usr/local/nagios/etc/objects/contacts.cfg
197
 
</pre>
198
 
 
199
 
<p>
200
 
<strong><u>5) Configure the Web Interface</u></strong>
201
 
</p>
202
 
 
203
 
<p>
204
 
Install the Nagios web config file in the Apache conf.d directory.
205
 
</p>
206
 
 
207
 
<pre>
208
 
make install-webconf
209
 
</pre>
210
 
 
211
 
<p>
212
 
Create a <i>nagiosadmin</i> account for logging into the Nagios web interface.  Remember the password you assign to this account - you'll need it later.
213
 
</p>
214
 
 
215
 
<pre>
216
 
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
217
 
</pre>
218
 
 
219
 
<p>
220
 
Restart Apache to make the new settings take effect.
221
 
</p>
222
 
 
223
 
<pre>
224
 
service httpd restart
225
 
</pre>
226
 
 
227
 
<p>
228
 
<img src="images/note.gif" border="0" align="bottom" alt="Note" title="Note"> Note: Consider implementing the ehanced CGI security measures described <a href="cgisecurity.html">here</a> to ensure that your web authentication credentials are not compromised.
229
 
</p>
230
 
 
231
 
 
232
 
<p>
233
 
<strong><u>6) Compile and Install the Nagios Plugins</u></strong>
234
 
</p>
235
 
 
236
 
<p>
237
 
Extract the Nagios plugins source code tarball.
238
 
</p>
239
 
 
240
 
<pre>
241
 
cd ~/downloads
242
 
tar xzf nagios-plugins-1.4.11.tar.gz
243
 
cd nagios-plugins-1.4.11
244
 
</pre>
245
 
 
246
 
<p>
247
 
Compile and install the plugins.
248
 
</p>
249
 
 
250
 
<pre>
251
 
./configure --with-nagios-user=nagios --with-nagios-group=nagios
252
 
make
253
 
make install
254
 
</pre>
255
 
 
256
 
 
257
 
<p>
258
 
<strong><u>7) Start Nagios</u></strong>
259
 
</p>
260
 
 
261
 
<p>
262
 
Add Nagios to the list of system services and have it automatically start when the system boots.
263
 
</p>
264
 
 
265
 
<pre>
266
 
chkconfig --add nagios
267
 
chkconfig nagios on
268
 
</pre>
269
 
 
270
 
<p>
271
 
Verify the sample Nagios configuration files.
272
 
</p>
273
 
 
274
 
<pre>
275
 
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
276
 
</pre>
277
 
 
278
 
<p>
279
 
If there are no errors, start Nagios.
280
 
</p>
281
 
 
282
 
<pre>
283
 
service nagios start
284
 
</pre>
285
 
 
286
 
<p>
287
 
<strong><u>8) Modify SELinux Settings</u></strong>
288
 
</p>
289
 
 
290
 
<p>
291
 
Fedora ships with SELinux (Security Enhanced Linux) installed and in Enforcing mode by default.  This can result in "Internal Server Error" messages when you attempt to access the Nagios CGIs.
292
 
</p>
293
 
 
294
 
<p>
295
 
See if SELinux is in Enforcing mode.
296
 
</p>
297
 
 
298
 
<pre>
299
 
getenforce
300
 
</pre>
301
 
 
302
 
<p>
303
 
Put SELinux into Permissive mode.
304
 
</p>
305
 
 
306
 
<pre>
307
 
setenforce 0
308
 
</pre>
309
 
 
310
 
<p>
311
 
To make this change permanent, you'll have to modify the settings in <i>/etc/selinux/config</i> and reboot. 
312
 
</p>
313
 
 
314
 
<p>
315
 
Instead of disabling SELinux or setting it to permissive mode, you can use the following command to run the CGIs under SELinux enforcing/targeted mode:
316
 
</p>
317
 
 
318
 
<pre>
319
 
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
320
 
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
321
 
</pre>
322
 
 
323
 
<p>
324
 
For information on running the Nagios CGIs under Enforcing mode with a targeted policy, visit the NagiosCommunity.org wiki at <a href="http://www.nagioscommunity.org/wiki">http://www.nagioscommunity.org/wiki</a>.
325
 
</p>
326
 
 
327
 
<p>
328
 
<strong><u>9) Login to the Web Interface</u></strong>
329
 
</p>
330
 
 
331
 
<p>
332
 
You should now be able to access the Nagios web interface at the URL below.  You'll be prompted for the username (<i>nagiosadmin</i>) and password you specified earlier.
333
 
</p>
334
 
 
335
 
<pre>
336
 
http://localhost/nagios/
337
 
</pre>
338
 
 
339
 
<p>
340
 
Click on the "Service Detail" navbar link to see details of what's being monitored on your local machine.  It will take a few minutes for Nagios to check all the services associated with your machine, as the checks are spread out over time.
341
 
</p>
342
 
 
343
 
<p>
344
 
<strong><u>10) Other Modifications</u></strong>
345
 
</p>
346
 
 
347
 
<p>
348
 
Make sure your machine's firewall rules are configured to allow access to the web server if you want to access the Nagios interface remotely.
349
 
</p>
350
 
 
351
 
<p>
352
 
Configuring email notifications is out of the scope of this documentation.  While Nagios is currently configured to send you email notifications, your system may not yet have a mail program properly installed or configured.  Refer to your system documentation, search the web, or look to the <a href="http://www.nagioscommunity.org/wiki">NagiosCommunity.org wiki</a> for specific instructions on configuring your system to send email messages to external addresses.  More information on notifications can be found <a href="notifications.html">here</a>.
353
 
</p>
354
 
 
355
 
<p>
356
 
<strong><u>11) You're Done</u></strong>
357
 
</p>
358
 
 
359
 
<p>
360
 
Congratulations!  You sucessfully installed Nagios.  Your journey into monitoring is just beginning.  You'll no doubt want to monitor more than just your local machine, so check out the following docs...
361
 
</p>
362
 
 
363
 
<ul>
364
 
<li><a href="monitoring-windows.html">Monitoring Windows machines</a></li>
365
 
<li><a href="monitoring-linux.html">Monitoring Linux/Unix machines</a></li>
366
 
<li><a href="monitoring-netware.html">Monitoring Netware servers</a></li>
367
 
<li><a href="monitoring-routers.html">Monitoring routers/switches</a></li>
368
 
<li><a href="monitoring-publicservices.html">Monitoring publicly available services (HTTP, FTP, SSH, etc.)</a></li>
369
 
</ul>
370
 
 
371
 
<hr>
372
 
 
373
 
</body>
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
2
 
 
3
 
 
4
 
 
5
<html>
 
6
 
 
7
<head>
 
8
 
 
9
<title>Fedora Quickstart</title>
 
10
 
 
11
 
 
12
 
 
13
<STYLE type="text/css">
 
14
 
 
15
<!--
 
16
 
 
17
        .Default { font-family: verdana,arial,serif; font-size: 8pt; }
 
18
 
 
19
        .PageTitle { font-family: verdana,arial,serif; font-size: 16pt; font-weight: bold; }
 
20
 
 
21
-->      
 
22
 
 
23
</STYLE>
 
24
 
 
25
 
 
26
 
 
27
</head>
 
28
 
 
29
 
 
30
 
 
31
<body bgcolor="#FFFFFF" text="black" class="Default">
 
32
 
 
33
 
 
34
 
 
35
<div align="center">
 
36
 
 
37
<img src="images/nagios.jpg" border="0" alt="Nagios" title="Nagios">
 
38
 
 
39
<h1 class="PageTitle">Fedora Quickstart</h1>
 
40
 
 
41
</div>
 
42
 
 
43
 
 
44
 
 
45
<hr>
 
46
 
 
47
 
 
48
 
 
49
<p>
 
50
 
 
51
<img src="images/upto.gif" border="0" align="middle" alt="Up To" title="Up To">Up To: <a href="toc.html">Contents</a><br>
 
52
 
 
53
<img src="images/seealso.gif" border="0" align="middle" alt="See Also" title="See Also"> See Also: <a href="quickstart.html">Quickstart Installation Guides</a>, <a href="security.html">Security Considerations</a>
 
54
 
 
55
</p>
 
56
 
 
57
 
 
58
 
 
59
<p>
 
60
 
 
61
<strong><u>Introduction</u></strong>
 
62
 
 
63
</p>
 
64
 
 
65
 
 
66
 
 
67
<p>
 
68
 
 
69
This guide is intended to provide you with simple instructions on how to install Nagios from source (code) on Fedora and have it monitoring your local machine inside of 20 minutes.  No advanced installation options are discussed here - just the basics that will work for 95% of users who want to get started.
 
70
 
 
71
</p>
 
72
 
 
73
 
 
74
 
 
75
<p>
 
76
 
 
77
These instructions were written based on a standard <b>Fedora Core 6</b> Linux distribution.
 
78
 
 
79
</p>
 
80
 
 
81
 
 
82
 
 
83
<p>
 
84
 
 
85
<strong><u>What You'll End Up With</u></strong>
 
86
 
 
87
</p>
 
88
 
 
89
 
 
90
 
 
91
<p>
 
92
 
 
93
If you follow these instructions, here's what you'll end up with:
 
94
 
 
95
</p>
 
96
 
 
97
 
 
98
 
 
99
<ul>
 
100
 
 
101
<li>Nagios and the plugins will be installed underneath /usr/local/nagios</li>
 
102
 
 
103
<li>Nagios will be configured to monitor a few aspects of your local system (CPU load, disk usage, etc.)</li>
 
104
 
 
105
<li>The Nagios web interface will be accessible at http://localhost/nagios/</li>
 
106
 
 
107
</ul>
 
108
 
 
109
 
 
110
 
 
111
<p>
 
112
 
 
113
<strong><u>Prerequisites</u></strong>
 
114
 
 
115
</p>
 
116
 
 
117
 
 
118
 
 
119
<p>
 
120
 
 
121
During portions of the installation you'll need to have <b>root</b> access to your machine.
 
122
 
 
123
</p>
 
124
 
 
125
 
 
126
 
 
127
<p>
 
128
 
 
129
Make sure you've installed the following packages on your Fedora installation before continuing. 
 
130
 
 
131
</p>
 
132
 
 
133
 
 
134
 
 
135
<ul>
 
136
 
 
137
<li>Apache</li>
 
138
 
 
139
<li>PHP</li>
 
140
 
 
141
<li>GCC compiler</li>
 
142
 
 
143
<li><a href="http://www.boutell.com/gd/">GD</a> development libraries</li>
 
144
 
 
145
</ul>
 
146
 
 
147
 
 
148
 
 
149
<p>
 
150
 
 
151
You can use <i>yum</i> to install these packages by running the following commands (as root):
 
152
 
 
153
</p>
 
154
 
 
155
 
 
156
 
 
157
<pre>
 
158
 
 
159
yum install httpd php
 
160
 
 
161
yum install gcc glibc glibc-common
 
162
 
 
163
yum install gd gd-devel
 
164
 
 
165
</pre>
 
166
 
 
167
 
 
168
 
 
169
<p>
 
170
 
 
171
<strong><u>1) Create Account Information</u></strong>
 
172
 
 
173
</p>
 
174
 
 
175
 
 
176
 
 
177
<p>
 
178
 
 
179
Become the root user.
 
180
 
 
181
</p>
 
182
 
 
183
 
 
184
 
 
185
<pre>
 
186
 
 
187
su -l
 
188
 
 
189
</pre>
 
190
 
 
191
 
 
192
 
 
193
<p>
 
194
 
 
195
Create a new <i>nagios</i> user account and give it a password.
 
196
 
 
197
</p>
 
198
 
 
199
 
 
200
 
 
201
<pre>
 
202
 
 
203
/usr/sbin/useradd -m nagios
 
204
 
 
205
passwd nagios
 
206
 
 
207
</pre>
 
208
 
 
209
 
 
210
 
 
211
<p>
 
212
 
 
213
Create a new <i>nagcmd</i> group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.
 
214
 
 
215
</p>
 
216
 
 
217
 
 
218
 
 
219
<pre>
 
220
 
 
221
/usr/sbin/groupadd nagcmd
 
222
 
 
223
/usr/sbin/usermod -a -G nagcmd nagios
 
224
 
 
225
/usr/sbin/usermod -a -G nagcmd apache
 
226
 
 
227
</pre>
 
228
 
 
229
 
 
230
 
 
231
<p>
 
232
 
 
233
<strong><u>2) Download Nagios and the Plugins</u></strong>
 
234
 
 
235
</p>
 
236
 
 
237
 
 
238
 
 
239
<p>
 
240
 
 
241
Create a directory for storing the downloads.
 
242
 
 
243
</p>
 
244
 
 
245
 
 
246
 
 
247
<pre>
 
248
 
 
249
mkdir ~/downloads
 
250
 
 
251
cd ~/downloads
 
252
 
 
253
</pre>
 
254
 
 
255
 
 
256
 
 
257
<p>
 
258
 
 
259
Download the source code tarballs of both Nagios and the Nagios plugins (visit <a href="http://www.nagios.org/download/">http://www.nagios.org/download/</a> for links to the latest versions).  These directions were tested with Nagios 3.1.1 and Nagios Plugins 1.4.11.
 
260
 
 
261
</p>
 
262
 
 
263
 
 
264
 
 
265
<pre>
 
266
 
 
267
wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz
 
268
 
 
269
wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
 
270
 
 
271
</pre>
 
272
 
 
273
 
 
274
 
 
275
<p>
 
276
 
 
277
<strong><u>3) Compile and Install Nagios</u></strong>
 
278
 
 
279
</p>
 
280
 
 
281
 
 
282
 
 
283
<p>
 
284
 
 
285
Extract the Nagios source code tarball.
 
286
 
 
287
</p>
 
288
 
 
289
 
 
290
 
 
291
<pre>
 
292
 
 
293
cd ~/downloads
 
294
 
 
295
tar xzf nagios-3.2.0.tar.gz
 
296
 
 
297
cd nagios-3.2.0
 
298
 
 
299
</pre>
 
300
 
 
301
 
 
302
 
 
303
<p>
 
304
 
 
305
Run the Nagios configure script, passing the name of the group you created earlier like so:
 
306
 
 
307
</p>
 
308
 
 
309
 
 
310
 
 
311
<pre>
 
312
 
 
313
./configure --with-command-group=nagcmd
 
314
 
 
315
</pre>
 
316
 
 
317
 
 
318
 
 
319
<p>
 
320
 
 
321
Compile the Nagios source code.
 
322
 
 
323
</p>
 
324
 
 
325
 
 
326
 
 
327
<pre>
 
328
 
 
329
make all
 
330
 
 
331
</pre>
 
332
 
 
333
 
 
334
 
 
335
<p>
 
336
 
 
337
Install binaries, init script, sample config files and set permissions on the external command directory.
 
338
 
 
339
</p>
 
340
 
 
341
 
 
342
 
 
343
<pre>
 
344
 
 
345
make install
 
346
 
 
347
make install-init
 
348
 
 
349
make install-config
 
350
 
 
351
make install-commandmode
 
352
 
 
353
</pre>
 
354
 
 
355
 
 
356
 
 
357
<p>
 
358
 
 
359
Don't start Nagios yet - there's still more that needs to be done...
 
360
 
 
361
</p>
 
362
 
 
363
 
 
364
 
 
365
<p>
 
366
 
 
367
<strong><u>4) Customize Configuration</u></strong>
 
368
 
 
369
</p>
 
370
 
 
371
 
 
372
 
 
373
<p>
 
374
 
 
375
Sample <a href="config.html">configuration files</a> have now been installed in the <i>/usr/local/nagios/etc</i> directory.  These sample files should work fine for getting started with Nagios.  You'll need to make just one change before you proceed...
 
376
 
 
377
</p>
 
378
 
 
379
 
 
380
 
 
381
<p>
 
382
 
 
383
Edit the <i>/usr/local/nagios/etc/objects/contacts.cfg</i> config file with your favorite editor and change the email address associated with the <i>nagiosadmin</i> contact definition to the address you'd like to use for receiving alerts.
 
384
 
 
385
</p>
 
386
 
 
387
 
 
388
 
 
389
<pre>
 
390
 
 
391
vi /usr/local/nagios/etc/objects/contacts.cfg
 
392
 
 
393
</pre>
 
394
 
 
395
 
 
396
 
 
397
<p>
 
398
 
 
399
<strong><u>5) Configure the Web Interface</u></strong>
 
400
 
 
401
</p>
 
402
 
 
403
 
 
404
 
 
405
<p>
 
406
 
 
407
Install the Nagios web config file in the Apache conf.d directory.
 
408
 
 
409
</p>
 
410
 
 
411
 
 
412
 
 
413
<pre>
 
414
 
 
415
make install-webconf
 
416
 
 
417
</pre>
 
418
 
 
419
 
 
420
 
 
421
<p>
 
422
 
 
423
Create a <i>nagiosadmin</i> account for logging into the Nagios web interface.  Remember the password you assign to this account - you'll need it later.
 
424
 
 
425
</p>
 
426
 
 
427
 
 
428
 
 
429
<pre>
 
430
 
 
431
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
 
432
 
 
433
</pre>
 
434
 
 
435
 
 
436
 
 
437
<p>
 
438
 
 
439
Restart Apache to make the new settings take effect.
 
440
 
 
441
</p>
 
442
 
 
443
 
 
444
 
 
445
<pre>
 
446
 
 
447
service httpd restart
 
448
 
 
449
</pre>
 
450
 
 
451
 
 
452
 
 
453
<p>
 
454
 
 
455
<img src="images/note.gif" border="0" align="bottom" alt="Note" title="Note"> Note: Consider implementing the ehanced CGI security measures described <a href="cgisecurity.html">here</a> to ensure that your web authentication credentials are not compromised.
 
456
 
 
457
</p>
 
458
 
 
459
 
 
460
 
 
461
 
 
462
 
 
463
<p>
 
464
 
 
465
<strong><u>6) Compile and Install the Nagios Plugins</u></strong>
 
466
 
 
467
</p>
 
468
 
 
469
 
 
470
 
 
471
<p>
 
472
 
 
473
Extract the Nagios plugins source code tarball.
 
474
 
 
475
</p>
 
476
 
 
477
 
 
478
 
 
479
<pre>
 
480
 
 
481
cd ~/downloads
 
482
 
 
483
tar xzf nagios-plugins-1.4.11.tar.gz
 
484
 
 
485
cd nagios-plugins-1.4.11
 
486
 
 
487
</pre>
 
488
 
 
489
 
 
490
 
 
491
<p>
 
492
 
 
493
Compile and install the plugins.
 
494
 
 
495
</p>
 
496
 
 
497
 
 
498
 
 
499
<pre>
 
500
 
 
501
./configure --with-nagios-user=nagios --with-nagios-group=nagios
 
502
 
 
503
make
 
504
 
 
505
make install
 
506
 
 
507
</pre>
 
508
 
 
509
 
 
510
 
 
511
 
 
512
 
 
513
<p>
 
514
 
 
515
<strong><u>7) Start Nagios</u></strong>
 
516
 
 
517
</p>
 
518
 
 
519
 
 
520
 
 
521
<p>
 
522
 
 
523
Add Nagios to the list of system services and have it automatically start when the system boots.
 
524
 
 
525
</p>
 
526
 
 
527
 
 
528
 
 
529
<pre>
 
530
 
 
531
chkconfig --add nagios
 
532
 
 
533
chkconfig nagios on
 
534
 
 
535
</pre>
 
536
 
 
537
 
 
538
 
 
539
<p>
 
540
 
 
541
Verify the sample Nagios configuration files.
 
542
 
 
543
</p>
 
544
 
 
545
 
 
546
 
 
547
<pre>
 
548
 
 
549
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
 
550
 
 
551
</pre>
 
552
 
 
553
 
 
554
 
 
555
<p>
 
556
 
 
557
If there are no errors, start Nagios.
 
558
 
 
559
</p>
 
560
 
 
561
 
 
562
 
 
563
<pre>
 
564
 
 
565
service nagios start
 
566
 
 
567
</pre>
 
568
 
 
569
 
 
570
 
 
571
<p>
 
572
 
 
573
<strong><u>8) Modify SELinux Settings</u></strong>
 
574
 
 
575
</p>
 
576
 
 
577
 
 
578
 
 
579
<p>
 
580
 
 
581
Fedora ships with SELinux (Security Enhanced Linux) installed and in Enforcing mode by default.  This can result in "Internal Server Error" messages when you attempt to access the Nagios CGIs.
 
582
 
 
583
</p>
 
584
 
 
585
 
 
586
 
 
587
<p>
 
588
 
 
589
See if SELinux is in Enforcing mode.
 
590
 
 
591
</p>
 
592
 
 
593
 
 
594
 
 
595
<pre>
 
596
 
 
597
getenforce
 
598
 
 
599
</pre>
 
600
 
 
601
 
 
602
 
 
603
<p>
 
604
 
 
605
Put SELinux into Permissive mode.
 
606
 
 
607
</p>
 
608
 
 
609
 
 
610
 
 
611
<pre>
 
612
 
 
613
setenforce 0
 
614
 
 
615
</pre>
 
616
 
 
617
 
 
618
 
 
619
<p>
 
620
 
 
621
To make this change permanent, you'll have to modify the settings in <i>/etc/selinux/config</i> and reboot. 
 
622
 
 
623
</p>
 
624
 
 
625
 
 
626
 
 
627
<p>
 
628
 
 
629
Instead of disabling SELinux or setting it to permissive mode, you can use the following command to run the CGIs under SELinux enforcing/targeted mode:
 
630
 
 
631
</p>
 
632
 
 
633
 
 
634
 
 
635
<pre>
 
636
 
 
637
chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
 
638
 
 
639
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
 
640
 
 
641
</pre>
 
642
 
 
643
 
 
644
 
 
645
<p>
 
646
 
 
647
For information on running the Nagios CGIs under Enforcing mode with a targeted policy, visit the <a href="http://support.nagios.com" target="_blank">Nagios Support Portal</a> or <a href="http://wiki.nagios.org" target="_blank">Nagios Community Wiki</a>.
 
648
 
 
649
</p>
 
650
 
 
651
 
 
652
 
 
653
<p>
 
654
 
 
655
<strong><u>9) Login to the Web Interface</u></strong>
 
656
 
 
657
</p>
 
658
 
 
659
 
 
660
 
 
661
<p>
 
662
 
 
663
You should now be able to access the Nagios web interface at the URL below.  You'll be prompted for the username (<i>nagiosadmin</i>) and password you specified earlier.
 
664
 
 
665
</p>
 
666
 
 
667
 
 
668
 
 
669
<pre>
 
670
 
 
671
http://localhost/nagios/
 
672
 
 
673
</pre>
 
674
 
 
675
 
 
676
 
 
677
<p>
 
678
 
 
679
Click on the "Service Detail" navbar link to see details of what's being monitored on your local machine.  It will take a few minutes for Nagios to check all the services associated with your machine, as the checks are spread out over time.
 
680
 
 
681
</p>
 
682
 
 
683
 
 
684
 
 
685
<p>
 
686
 
 
687
<strong><u>10) Other Modifications</u></strong>
 
688
 
 
689
</p>
 
690
 
 
691
 
 
692
 
 
693
<p>
 
694
 
 
695
Make sure your machine's firewall rules are configured to allow access to the web server if you want to access the Nagios interface remotely.
 
696
 
 
697
</p>
 
698
 
 
699
 
 
700
 
 
701
<p>
 
702
 
 
703
Configuring email notifications is out of the scope of this documentation.  While Nagios is currently configured to send you email notifications, your system may not yet have a mail program properly installed or configured.  Refer to your system documentation, search the web, or look to the <a href="http://support.nagios.com" target="_blank">Nagios Support Portal</a> or <a href="http://wiki.nagios.org" target="_blank">Nagios Community Wiki</a> for specific instructions on configuring your system to send email messages to external addresses.  More information on notifications can be found <a href="notifications.html">here</a>.
 
704
 
 
705
</p>
 
706
 
 
707
 
 
708
 
 
709
<p>
 
710
 
 
711
<strong><u>11) You're Done</u></strong>
 
712
 
 
713
</p>
 
714
 
 
715
 
 
716
 
 
717
<p>
 
718
 
 
719
Congratulations!  You sucessfully installed Nagios.  Your journey into monitoring is just beginning.  You'll no doubt want to monitor more than just your local machine, so check out the following docs...
 
720
 
 
721
</p>
 
722
 
 
723
 
 
724
 
 
725
<ul>
 
726
 
 
727
<li><a href="monitoring-windows.html">Monitoring Windows machines</a></li>
 
728
 
 
729
<li><a href="monitoring-linux.html">Monitoring Linux/Unix machines</a></li>
 
730
 
 
731
<li><a href="monitoring-netware.html">Monitoring Netware servers</a></li>
 
732
 
 
733
<li><a href="monitoring-routers.html">Monitoring routers/switches</a></li>
 
734
 
 
735
<li><a href="monitoring-publicservices.html">Monitoring publicly available services (HTTP, FTP, SSH, etc.)</a></li>
 
736
 
 
737
</ul>
 
738
 
 
739
 
 
740
 
 
741
<hr>
 
742
 
 
743
 
 
744
 
 
745
</body>
 
746
 
374
747
</html>
 
 
b'\\ No newline at end of file'