Projet

Général

Profil

From source » Historique » Version 21

Patrice Nadeau, 2015-01-02 17:19

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 1 Patrice Nadeau
La page est disponible à http://server.domain/nagios
61 19 Patrice Nadeau
62
h3. Services
63
64
<pre><code class="bash">
65
systemctl enable nagios
66
systemctl start nagios
67
</code></pre>
68 20 Patrice Nadeau
69
h2. Nagios Plugins
70
71 1 Patrice Nadeau
h3. Compilation
72 20 Patrice Nadeau
73
<pre><code class="bash">
74 21 Patrice Nadeau
cd ~/tmp/nagios-plugin
75 20 Patrice Nadeau
./configure --with-nagios-user=nagios --with-nagios-group=nagios
76
make
77
make install
78
</code></pre>