From source » Historique » Version 22
Patrice Nadeau, 2015-01-02 17:21
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 | 21 | Patrice Nadeau | mkdir ~/tmp |
23 | cd ~/tmp |
||
24 | 1 | Patrice Nadeau | wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz |
25 | wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz |
||
26 | 3 | Patrice Nadeau | </code></pre> |
27 | 1 | Patrice Nadeau | |
28 | 9 | Patrice Nadeau | h2. Création de l'usager et groupe |
29 | |||
30 | 3 | Patrice Nadeau | <pre><code class="bash"> |
31 | useradd nagios |
||
32 | groupadd nagcmd |
||
33 | 11 | Patrice Nadeau | /usr/sbin/groupadd nagios |
34 | 1 | Patrice Nadeau | usermod -a -G nagcmd nagios |
35 | 11 | Patrice Nadeau | usermod -a -G nagios nagios |
36 | 9 | Patrice Nadeau | </code></pre> |
37 | |||
38 | 17 | Patrice Nadeau | h2. Nagios Core |
39 | |||
40 | h3. Compilation |
||
41 | 1 | Patrice Nadeau | |
42 | 9 | Patrice Nadeau | <pre><code class="bash"> |
43 | 21 | Patrice Nadeau | cd ~/tmp/nagios-4.0.8 |
44 | 9 | Patrice Nadeau | ./configure --with-command-group=nagcmd |
45 | make all |
||
46 | 12 | Patrice Nadeau | make install |
47 | make install-init |
||
48 | make install-commandmode |
||
49 | make install-config |
||
50 | 13 | Patrice Nadeau | make install-webconf |
51 | 3 | Patrice Nadeau | </code></pre> |
52 | 14 | Patrice Nadeau | |
53 | 19 | Patrice Nadeau | h3. Configuration de l'usager web |
54 | 14 | Patrice Nadeau | |
55 | <pre><code class="bash"> |
||
56 | htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin |
||
57 | 15 | Patrice Nadeau | systemctl restart apache2 |
58 | 14 | Patrice Nadeau | </code></pre> |
59 | 16 | Patrice Nadeau | |
60 | 22 | Patrice Nadeau | h2. Nagios Plugins |
61 | |||
62 | h3. Compilation |
||
63 | |||
64 | <pre><code class="bash"> |
||
65 | cd ~/tmp/nagios-plugin |
||
66 | ./configure --with-nagios-user=nagios --with-nagios-group=nagios |
||
67 | make |
||
68 | make install |
||
69 | </code></pre> |
||
70 | |||
71 | 20 | Patrice Nadeau | La page est disponible à http://server.domain/nagios |
72 | |||
73 | h3. Services |
||
74 | 1 | Patrice Nadeau | |
75 | 20 | Patrice Nadeau | <pre><code class="bash"> |
76 | systemctl enable nagios |
||
77 | 1 | Patrice Nadeau | </code></pre> |
78 | |||
79 | 22 | Patrice Nadeau | Vérifier si les fichiers de configurations sont bon |
80 | <pre><code class="bash"> |
||
81 | /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg |
||
82 | </code></pre> |
||
83 | 20 | Patrice Nadeau | |
84 | 22 | Patrice Nadeau | Lancer Nagios |
85 | 20 | Patrice Nadeau | <pre><code class="bash"> |
86 | 22 | Patrice Nadeau | systemctl start nagios |
87 | 1 | Patrice Nadeau | </code></pre> |