From source » Historique » Version 27
Patrice Nadeau, 2015-01-03 10:17
1 | 18 | Patrice Nadeau | {{TOC}} |
---|---|---|---|
2 | |||
3 | 25 | Patrice Nadeau | h1. Installation à partir des sources |
4 | 1 | Patrice Nadeau | |
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 | 24 | Patrice Nadeau | # Permet de soumettre des check via l'interface web |
37 | usermod -a -G nagcmd wwwrun |
||
38 | 9 | Patrice Nadeau | </code></pre> |
39 | |||
40 | 17 | Patrice Nadeau | h2. Nagios Core |
41 | |||
42 | h3. Compilation |
||
43 | 1 | Patrice Nadeau | |
44 | 9 | Patrice Nadeau | <pre><code class="bash"> |
45 | 21 | Patrice Nadeau | cd ~/tmp/nagios-4.0.8 |
46 | 9 | Patrice Nadeau | ./configure --with-command-group=nagcmd |
47 | make all |
||
48 | 12 | Patrice Nadeau | make install |
49 | make install-init |
||
50 | make install-commandmode |
||
51 | make install-config |
||
52 | 13 | Patrice Nadeau | make install-webconf |
53 | 3 | Patrice Nadeau | </code></pre> |
54 | 14 | Patrice Nadeau | |
55 | 19 | Patrice Nadeau | h3. Configuration de l'usager web |
56 | 14 | Patrice Nadeau | |
57 | <pre><code class="bash"> |
||
58 | htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin |
||
59 | 15 | Patrice Nadeau | systemctl restart apache2 |
60 | 14 | Patrice Nadeau | </code></pre> |
61 | 16 | Patrice Nadeau | |
62 | 22 | Patrice Nadeau | h2. Nagios Plugins |
63 | |||
64 | h3. Compilation |
||
65 | |||
66 | <pre><code class="bash"> |
||
67 | cd ~/tmp/nagios-plugin |
||
68 | ./configure --with-nagios-user=nagios --with-nagios-group=nagios |
||
69 | make |
||
70 | make install |
||
71 | </code></pre> |
||
72 | |||
73 | 26 | Patrice Nadeau | h2. Nagios Remote Plugin Executor |
74 | |||
75 | Pour exécuter des « check » sur des serveurs distants. |
||
76 | |||
77 | h3. Telechargement |
||
78 | |||
79 | <pre><code class="bash"> |
||
80 | http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz |
||
81 | </code></pre> |
||
82 | |||
83 | h3. Compilation |
||
84 | |||
85 | |||
86 | 23 | Patrice Nadeau | h2. Services |
87 | 1 | Patrice Nadeau | |
88 | 20 | Patrice Nadeau | <pre><code class="bash"> |
89 | systemctl enable nagios |
||
90 | 1 | Patrice Nadeau | </code></pre> |
91 | |||
92 | 22 | Patrice Nadeau | Vérifier si les fichiers de configurations sont bon |
93 | <pre><code class="bash"> |
||
94 | /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg |
||
95 | </code></pre> |
||
96 | 20 | Patrice Nadeau | |
97 | 22 | Patrice Nadeau | Lancer Nagios |
98 | 20 | Patrice Nadeau | <pre><code class="bash"> |
99 | 22 | Patrice Nadeau | systemctl start nagios |
100 | 1 | Patrice Nadeau | </code></pre> |