From source » Historique » Version 30
  Patrice Nadeau, 2015-01-03 10:26 
  
| 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 | 29 | Patrice Nadeau | Ce « add-on » se divise en deux parties  | 
| 76 | *  | 
||
| 77 | * Pour exécuter des « check » sur des serveurs distants.  | 
||
| 78 | 1 | Patrice Nadeau | |
| 79 | |||
| 80 | 29 | Patrice Nadeau | h3. Téléchargement  | 
| 81 | |||
| 82 | 26 | Patrice Nadeau | <pre><code class="bash">  | 
| 83 | http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz  | 
||
| 84 | </code></pre>  | 
||
| 85 | 1 | Patrice Nadeau | |
| 86 | h3. Compilation  | 
||
| 87 | 29 | Patrice Nadeau | |
| 88 | <pre><code class="bash">  | 
||
| 89 | # Installe les librairies de développement SSL  | 
||
| 90 | 30 | Patrice Nadeau | zypper install libopenssl-devel  | 
| 91 | 29 | Patrice Nadeau | # Décompresse le fichier  | 
| 92 | tar xvf nrpe-2.15.tar.gz  | 
||
| 93 | cd nrpe-2.15  | 
||
| 94 | # lance la compilation  | 
||
| 95 | ./configure  | 
||
| 96 | make all  | 
||
| 97 | </code></pre>  | 
||
| 98 | 26 | Patrice Nadeau | |
| 99 | 23 | Patrice Nadeau | h2. Services  | 
| 100 | 1 | Patrice Nadeau | |
| 101 | 20 | Patrice Nadeau | <pre><code class="bash">  | 
| 102 | systemctl enable nagios  | 
||
| 103 | 1 | Patrice Nadeau | </code></pre>  | 
| 104 | |||
| 105 | 22 | Patrice Nadeau | Vérifier si les fichiers de configurations sont bon  | 
| 106 | <pre><code class="bash">  | 
||
| 107 | /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  | 
||
| 108 | </code></pre>  | 
||
| 109 | 20 | Patrice Nadeau | |
| 110 | 22 | Patrice Nadeau | Lancer Nagios  | 
| 111 | 20 | Patrice Nadeau | <pre><code class="bash">  | 
| 112 | 22 | Patrice Nadeau | systemctl start nagios  | 
| 113 | 1 | Patrice Nadeau | </code></pre>  | 
| 114 | 28 | Patrice Nadeau | |
| 115 | La page est disponible à http://server.domain/nagios  |