From source » Historique » Version 19
Patrice Nadeau, 2015-01-02 17:07
1 | 18 | Patrice Nadeau | {{TOC}} |
---|---|---|---|
2 | |||
3 | 1 | Patrice Nadeau | h1. From source |
4 | |||
5 | 7 | Patrice Nadeau | L'installation à partir des sources permet |
6 | 6 | Patrice Nadeau | * d'avoir la version la plus récente |
7 | * n'est pas relier à une plate-forme spécifique (i686 vs x86_64 vs ARM) |
||
8 | |||
9 | 10 | Patrice Nadeau | Les test ont été fait à partir d'un BeagleBone Black sous openSUSE 13.2. |
10 | 8 | Patrice Nadeau | |
11 | 4 | Patrice Nadeau | h2. Prérequis |
12 | 1 | Patrice Nadeau | |
13 | 6 | Patrice Nadeau | Installer les utilitaires pour la compilation : |
14 | 5 | Patrice Nadeau | <pre><code class="bash"> |
15 | zypper install make gcc |
||
16 | </code></pre> |
||
17 | 4 | Patrice Nadeau | |
18 | 9 | Patrice Nadeau | h2. Fichiers |
19 | |||
20 | 2 | Patrice Nadeau | Télécharger |
21 | 1 | Patrice Nadeau | <pre><code class="bash"> |
22 | mkdir tmp |
||
23 | wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz |
||
24 | wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz |
||
25 | 3 | Patrice Nadeau | </code></pre> |
26 | 1 | Patrice Nadeau | |
27 | 9 | Patrice Nadeau | h2. Création de l'usager et groupe |
28 | |||
29 | 3 | Patrice Nadeau | <pre><code class="bash"> |
30 | useradd nagios |
||
31 | groupadd nagcmd |
||
32 | 11 | Patrice Nadeau | /usr/sbin/groupadd nagios |
33 | 1 | Patrice Nadeau | usermod -a -G nagcmd nagios |
34 | 11 | Patrice Nadeau | usermod -a -G nagios nagios |
35 | 9 | Patrice Nadeau | </code></pre> |
36 | |||
37 | 17 | Patrice Nadeau | h2. Nagios Core |
38 | |||
39 | h3. Compilation |
||
40 | 9 | Patrice Nadeau | |
41 | <pre><code class="bash"> |
||
42 | cd nagios-4.0.8 |
||
43 | ./configure --with-command-group=nagcmd |
||
44 | make all |
||
45 | 12 | Patrice Nadeau | make install |
46 | make install-init |
||
47 | make install-commandmode |
||
48 | make install-config |
||
49 | 13 | Patrice Nadeau | make install-webconf |
50 | 3 | Patrice Nadeau | </code></pre> |
51 | 14 | Patrice Nadeau | |
52 | 19 | Patrice Nadeau | h3. Configuration de l'usager web |
53 | 14 | Patrice Nadeau | |
54 | <pre><code class="bash"> |
||
55 | htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin |
||
56 | 15 | Patrice Nadeau | systemctl restart apache2 |
57 | 14 | Patrice Nadeau | </code></pre> |
58 | 16 | Patrice Nadeau | |
59 | 1 | Patrice Nadeau | La page est disponible à http://server.domain/nagios |
60 | 19 | Patrice Nadeau | |
61 | h3. Services |
||
62 | |||
63 | <pre><code class="bash"> |
||
64 | systemctl enable nagios |
||
65 | systemctl start nagios |
||
66 | </code></pre> |