/[gentoo]/xml/htdocs/doc/en/jffnms.xml
Gentoo

Contents of /xml/htdocs/doc/en/jffnms.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download) (as text)
Thu Aug 30 07:24:00 2012 UTC (2 years ago) by nightmorph
Branch: MAIN
Changes since 1.11: +17 -15 lines
File MIME type: application/xml
updated postgresql sections for the new SLOTs, bug #433072

1 neysx 1.1 <?xml version="1.0" encoding="UTF-8"?>
2     <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 nightmorph 1.12 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/jffnms.xml,v 1.11 2011/09/04 17:53:40 swift Exp $ -->
4 neysx 1.1
5 nightmorph 1.12 <guide>
6 neysx 1.1 <title>Jffnms Installation and Setup Guide</title>
7    
8     <author title="Author">
9 nightmorph 1.12 <mail link="angusyoung"/>
10 neysx 1.1 </author>
11    
12     <abstract>
13     This guide shows you how to proceed with the post installation setup of Jffnms,
14     a network management and monitoring system, and how to monitor your systems
15     with it.
16     </abstract>
17    
18     <!-- The content of this document is licensed under the CC-BY-SA license -->
19     <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
20     <license/>
21    
22 nightmorph 1.12 <version>2</version>
23     <date>2012-08-30</date>
24 neysx 1.1
25     <chapter>
26 nightmorph 1.5 <title>Jffnms Basics</title>
27 neysx 1.1 <section>
28     <title>Introduction</title>
29     <body>
30    
31     <p>
32     <uri link="http://www.jffnms.org">Jffnms</uri> is a network management and
33     monitoring system. It allows you to grab information from many different kinds
34     of hosts and protocols. With this guide, we aim to show you how to get Jffnms
35     properly installed and have your systems monitored by this amazing tool.
36     </p>
37    
38     </body>
39     </section>
40     </chapter>
41    
42     <chapter>
43     <title>Initial Setup</title>
44     <section>
45 nightmorph 1.10 <title>Choosing your USE flags</title>
46 neysx 1.3 <body>
47    
48     <p>
49 nightmorph 1.10 The Jffnms ebuild has the following USE flags available:
50 neysx 1.3 </p>
51    
52     <table>
53     <tr>
54     <th>USE Flags for Jffnms</th>
55     <th>Description</th>
56     </tr>
57     <tr>
58     <ti><c>mysql</c></ti>
59     <ti>Uses Mysql to store Jffnms data</ti>
60     </tr>
61     <tr>
62     <ti><c>postgres</c></ti>
63     <ti>Uses PostgreSQL to store Jffnms data</ti>
64     </tr>
65     <tr>
66     <ti><c>snmp</c></ti>
67     <ti>
68 nightmorph 1.6 Adds support for snmp, which enables jffnms to gather data from other hosts.
69 neysx 1.3 </ti>
70     </tr>
71     </table>
72    
73     </body>
74     </section>
75     <section>
76 nightmorph 1.10 <title>USE flags for PHP</title>
77 neysx 1.3 <body>
78    
79     <p>
80 nightmorph 1.10 Being written in PHP, Jffnms is heavily dependent on PHP USE flags. In order to
81     install Jffnms successfully, you are required to have your PHP package installed
82 nightmorph 1.5 with (at least) the following USE flags:
83 neysx 1.3 </p>
84    
85     <table>
86     <tr>
87     <th>USE Flags for PHP</th>
88     <th>Description</th>
89     </tr>
90     <tr>
91     <ti><c>gd</c></ti>
92     <ti>Adds support for media-libs/gd (to generate graphics on the fly)</ti>
93     </tr>
94     <tr>
95     <ti><c>wddx</c></ti>
96     <ti>Adds support for Web Distributed Data eXchange </ti>
97     </tr>
98     <tr>
99     <ti><c>sockets</c></ti>
100     <ti>Adds support for tcp/ip sockets</ti>
101     </tr>
102     <tr>
103     <ti><c>session</c></ti>
104     <ti>Adds persistent session support</ti>
105     </tr>
106     <tr>
107     <ti><c>spl</c></ti>
108     <ti>Adds support for the Standard PHP Library</ti>
109     </tr>
110     <tr>
111     <ti><c>cli</c></ti>
112     <ti>Enable CLI SAPI</ti>
113     </tr>
114     </table>
115    
116     </body>
117     </section>
118     <section>
119 neysx 1.1 <title>Installation</title>
120     <body>
121    
122     <p>
123     Just like any package in Portage, jffnms can be installed with <c>emerge</c>:
124     </p>
125    
126     <pre caption="Installing Jffnms">
127     # <i>emerge jffnms</i>
128     </pre>
129    
130     <p>
131     Jffnms should be installed in <path>/opt/jffnms/</path>.
132     </p>
133    
134     </body>
135     </section>
136     <section>
137     <title>Configuring Apache 2</title>
138     <body>
139    
140     <warn>
141 nightmorph 1.10 This very basic configuration procedure for Apache does not cover all aspects
142 neysx 1.1 of setting up a web server.
143     </warn>
144    
145     <p>
146     Sometimes you will want to run Jffnms on your local computer instead of a
147     remote server. If this is your case, it is very likely that you don't have an
148     apache setup running. Don't worry about installing apache though, Portage has
149     already done that for you. Nevertheless, you still have to configure and test
150 nightmorph 1.10 apache, which (luckily) is pretty straightforward. Start by adding Apache to
151 neysx 1.1 your default runlevel:
152     </p>
153    
154 nightmorph 1.10 <pre caption="Adding apache2 to the default runlevel">
155 neysx 1.1 # <i>rc-update add apache2 default</i>
156     </pre>
157    
158     <p>
159     If you haven't done it yet, it's time to start apache2:
160     </p>
161    
162     <pre caption="Starting apache2">
163     # <i>/etc/init.d/apache2 start</i>
164     </pre>
165    
166     <p>
167     Finally, point your browser at <uri>http://localhost/</uri> and you should be
168     presented with a home page about your newly installed Apache 2. Now that we
169     know that Apache is up and running, we can proceed to the mod_php
170     configuration. Fire up your favorite text editor, open
171 nightmorph 1.8 <path>/etc/conf.d/apache2</path> and add <c>-D PHP5</c> the APACHE2_OPTS
172 neysx 1.1 variable.
173     </p>
174    
175     <pre caption="Apache 2 Configuration">
176     # <i>nano -w /etc/conf.d/apache2</i>
177 nightmorph 1.8 APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5"
178 neysx 1.1 </pre>
179    
180     <p>
181     After that, you should create a symlink to the Jffnms install directory in your
182     Apache document root dir. In Gentoo, by default, Apache uses
183     <path>/var/www/localhost/htdocs</path> as document root. So, you should do the
184     following:
185     </p>
186    
187     <pre caption="Creating Jffnms symlink">
188 nightmorph 1.7 # <i>cd /var/www/localhost/htdocs &amp;&amp; ln -s /opt/jffnms/</i>
189 neysx 1.1 </pre>
190    
191     </body>
192     </section>
193     <section>
194     <title>Configuring PHP</title>
195     <body>
196    
197     <p>
198 nightmorph 1.10 Now that Apache is running, it is time to configure PHP. Jffnms requires that
199 nightmorph 1.5 you set some variables in php.ini in order to run. The <path>php.ini</path> file
200 nightmorph 1.8 is usually located in <path>/etc/php/apache2-php5/php.ini</path>. You have to
201 nightmorph 1.5 set these variables to the following values:
202 neysx 1.1 </p>
203    
204     <pre caption="Configuring PHP">
205 nightmorph 1.8 # <i>nano -w /etc/php/apache2-php5/php.ini</i>
206 neysx 1.1 register_globals = On
207     register_argc_argv = On
208     error_reporting = E_ALL &amp; ~E_NOTICE
209     allow_url_fopen = On
210 nightmorph 1.8 include_path = ".:/usr/share/php5:/usr/share/php:/usr/share/php/PEAR"
211 neysx 1.1 short_open_tag = On
212     </pre>
213    
214     </body>
215     </section>
216     <section>
217     <title>Database setup</title>
218     <body>
219    
220     <warn>
221     Please note again that this a very basic configuration procedure for any
222     database system and does not cover all aspects of setting up such systems.
223     </warn>
224    
225     <p>
226     Jffnms allows you to use either PostgreSQL or MySQL as its database. Here we'll
227     show you how to create the database and necessary tables where Jffnms will
228     store its data. It's important to note that it isn't necessary to have a
229 nightmorph 1.10 database running locally to run Jffnms and except for the fact that you need to
230 neysx 1.1 run this commands on the remote host, the procedure is the same.
231     </p>
232    
233     </body>
234     </section>
235     <section>
236 nightmorph 1.10 <title>Setting up PostgreSQL</title>
237 neysx 1.1 <body>
238    
239     <note>
240     If you already have a PostgreSQL database up and running, you can proceed to
241     the <uri link="#use-pg">next section</uri>.
242     </note>
243    
244     <p>
245 nightmorph 1.12 You should add PostgreSQL to your default runlevel so it's started each time you
246     boot your computer. Make sure to change <c>${SLOT}</c> to your PostgreSQL
247     slot, such as 9.1 or 9.2.
248 neysx 1.1 </p>
249    
250     <pre caption="Adding PostgreSQL to the default runlevel">
251 nightmorph 1.12 # <i>rc-update add postgresql-${SLOT} default</i>
252 neysx 1.1 </pre>
253    
254     <p>
255 nightmorph 1.12 Now you must setup the PostgreSQL database. Make sure to change
256     <c>${VERSION}</c> to your PostgreSQL version, such as 9.0.9 or 9.1.5.
257 neysx 1.1 </p>
258    
259 nightmorph 1.4 <pre caption="Preparing PostgreSQL">
260 nightmorph 1.12 # <i>emerge --config postgresql-server-${VERSION}</i>
261 neysx 1.1 </pre>
262    
263     <p>
264 nightmorph 1.4 Now start PostgreSQL:
265 neysx 1.1 </p>
266    
267     <pre caption="Starting PostgreSQL">
268 nightmorph 1.12 # <i>/etc/init.d/postgresql-${SLOT} start</i>
269 neysx 1.1 </pre>
270    
271     </body>
272     </section>
273     <section id="use-pg">
274     <title>Using PostgreSQL as database</title>
275     <body>
276    
277     <p>
278     Once you have your PostgreSQL set up and running, you have to create a Jffnms
279 nightmorph 1.9 user and a database to store host data.
280 neysx 1.1 </p>
281    
282 nightmorph 1.9 <pre caption="Creating the Jffnms user and database">
283     # <i>psql template1 postgres</i>
284     template1=# <i>create user jffnms password 'jfnms' createdb;</i>
285     template1=# <i>\connect template1 jffnms</i>
286     template1=# <i>create database jffnms;</i>
287     template1=# <i>\q</i>
288 neysx 1.1 </pre>
289    
290     <p>
291     Finally, you need to create all the tables where data will be stored:
292     </p>
293    
294 nightmorph 1.9 <pre caption="Creating Jffnms tables">
295 nightmorph 1.12 # <i>psql jffnms jffnms &lt; /opt/jffnms/docs/jffnms-0.9.3.pgsql</i>
296 neysx 1.1 </pre>
297    
298     <p>
299 nightmorph 1.10 Once you have run those steps, the PostgreSQL database configuration for Jffnms
300 neysx 1.1 should be ok.
301     </p>
302    
303     </body>
304     </section>
305     <section>
306 nightmorph 1.10 <title>Using MySQL as database</title>
307 neysx 1.1 <body>
308    
309     <warn>
310     Installing and configuring a MySQL database is not covered in this guide.
311     Please see our <uri link="/doc/en/mysql-howto.xml">MySQL Startup Guide</uri>.
312     </warn>
313    
314     <p>
315 nightmorph 1.7 In case you want to run Jffnms with MySQL, you'll first need to create a
316     database and a MySQL user. After that, create your MySQL table:
317 neysx 1.1 </p>
318    
319 nightmorph 1.7 <pre caption="Create a mysql table.">
320 nightmorph 1.12 # <i>mysql -u jffnms -pjffnms jffnms &lt; /opt/jffnms/docs/jffnms-0.9.3.mysql</i>
321 neysx 1.1 </pre>
322    
323     </body>
324     </section>
325     <section>
326     <title>UDP Port Monitoring and discovery</title>
327     <body>
328    
329     <warn>
330     This section covers setting up and running suid programs, so it may not be
331     adequate for systems where security is too much an issue.
332     </warn>
333    
334     <p>
335     If you want UDP port monitoring and discovery, you need to set <c>nmap</c> and
336 rane 1.2 <c>fping</c> as a SUID programs. This may give you security hole in case
337 neysx 1.1 there's a bug in one of them. To set them as a SUID you can run the following
338     commands:
339     </p>
340    
341     <pre caption="Setting up udp port monitoring and discovery">
342     # <i>chmod +s /usr/bin/nmap ; chmod a+x /usr/bin/nmap</i>
343     # <i>chmod +s /usr/sbin/fping ; chmod a+x /usr/sbin/fping</i>
344     </pre>
345    
346     </body>
347     </section>
348     </chapter>
349    
350     <chapter>
351     <title>Configuring Jffnms</title>
352     <section>
353     <title>Configuring the poller process</title>
354     <body>
355    
356     <p>
357     The poller process is responsible for gathering data from hosts. In order to
358     collect this data at regular intervals, it must be added to crontab.
359     </p>
360    
361 neysx 1.3 <pre caption="Collecting data at regular intervals">
362 neysx 1.1 # <i>crontab -u jffnms /opt/jffnms/docs/unix/crontab</i>
363     # <i>crontab -e -u jffnms</i>
364     </pre>
365    
366     </body>
367     </section>
368 neysx 1.3 <section>
369 nightmorph 1.10 <title>Final setup</title>
370 neysx 1.3 <body>
371    
372     <p>
373     By now, Jffnms should be correctly installed on your system. You still need,
374 nightmorph 1.5 however, to configure Jffnms. Luckily, Jffnms provides us with an easy to use
375 neysx 1.3 web page where it's possible to configure access to database, user access as
376     well as check if the current host configuration suffices Jffnms needs. You can
377     access this web interface through the following URL:
378 nightmorph 1.7 <uri>http://localhost/jffnms/admin/setup.php</uri>. You can login to your new
379     installation by using the username and password <c>admin</c>. You should visit
380     <uri link="http://www.jffnms.org/">Jffnms's home page</uri> for details on how
381     to properly configure it.
382 neysx 1.3 </p>
383    
384     </body>
385     </section>
386 neysx 1.1 </chapter>
387    
388     <chapter>
389     <title>Support</title>
390     <section>
391     <body>
392    
393     <p>
394 nightmorph 1.10 Though Jffnms is a wonderful application, it is a bit hard to get it up and
395 neysx 1.1 running. So if you run into problems with Jffnms, there are some places where
396     you can look for help:
397     </p>
398    
399     <ul>
400     <li>
401     <uri link="http://www.jffnms.org/docs/installing.html">Jffnms Installation
402     Manual</uri>
403     </li>
404     <li>
405     <uri link="http://www.jffnms.org/docs/jffnms.html">Jffnms Manual</uri>
406     </li>
407     <li><uri link="http://forums.gentoo.org">Gentoo Forums</uri></li>
408 neysx 1.3 <li>
409 nightmorph 1.12 <uri link="http://www.postgresql.org/docs/9.1/static/index.html">PostgreSQL
410     9 Documentation</uri>
411 neysx 1.3 </li>
412     <li><uri link="http://dev.mysql.com/doc/">MySQL Documentation</uri></li>
413 neysx 1.1 </ul>
414    
415     </body>
416     </section>
417     </chapter>
418     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20