<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://marco.adeti.org/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://marco.adeti.org/feed.php">
        <title>Marco RODRIGUES</title>
        <description></description>
        <link>http://marco.adeti.org/</link>
        <image rdf:resource="http://marco.adeti.org/lib/images/favicon.ico" />
       <dc:date>2010-03-10T21:36:46+01:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/systeme/mysql/ajout_utilisateur"/>
                <rdf:li rdf:resource="http://marco.adeti.org/dev/php/ecrire_fichier"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/dev/php/mesurer_temps_execution_script"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/scripts/wrapper_monit"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/scripts/ssh_wrapper_clefs_backup"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/systeme/subversion/installation"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/scripts/supprimer_ligne_fichier"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/supervision/nagios_permettre_commandes_externes"/>
                <rdf:li rdf:resource="http://marco.adeti.org/libre/supervision/centreon"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://marco.adeti.org/lib/images/favicon.ico">
        <title>Marco RODRIGUES</title>
        <link>http://marco.adeti.org/</link>
        <url>http://marco.adeti.org/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://marco.adeti.org/libre/systeme/mysql/ajout_utilisateur">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-10T16:39:14+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:systeme:mysql:ajout_utilisateur</title>
        <link>http://marco.adeti.org/libre/systeme/mysql/ajout_utilisateur</link>
        <description>Requête SQL : 



CREATE USER 'monutilisateur'@'localhost' IDENTIFIED BY 'monmotdepasse';
GRANT USAGE ON * . * TO 'monuser'@'localhost' IDENTIFIED BY 'monmotdepasse' WITH MAX_QUERIES_PER_HOUR  MAX_CONNECTIONS_PER_HOUR  MAX_UPDATES_PER_HOUR  MAX_USER_CONNECTIONS  ;
CREATE DATABASE IF NOT EXISTS `mabasededonnees` ;
GRANT ALL PRIVILEGES ON `mabasededonnees` . * TO 'monutilisateur'@'localhost';</description>
    </item>
    <item rdf:about="http://marco.adeti.org/dev/php/ecrire_fichier">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-10T15:34:29+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>dev:php:ecrire_fichier</title>
        <link>http://marco.adeti.org/dev/php/ecrire_fichier</link>
        <description>Voici une méthode pour écrire des données dans un fichier depuis le php :


# Définition du nom du fichier
$fileContainer = &quot;/mondossier/monfichier.log&quot;;
# Ouverture du fichier en mode &quot;ajout&quot;
$filePointer = fopen($fileContainer, &quot;a&quot;);
# Formatage du message avec un retour à la ligne final
$logMsg = &quot; Mon texte du message &quot; . &quot;\n&quot;;
# Ecriture du message dans le fichier
fputs($filePointer, $logMsg);
# Fermeture du fichier
fclose($filePointer);</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/dev/php/mesurer_temps_execution_script">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-09T16:15:36+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:dev:php:mesurer_temps_execution_script</title>
        <link>http://marco.adeti.org/libre/dev/php/mesurer_temps_execution_script</link>
        <description>Pour mesurer le temps d'exécution d'un script php, vous pouvez utiliser la fonction microtime(), qui retourne le timestamp UNIX actuel avec les microsecondes .

Voici un exemple d'utilisation :


&lt;?php

...

$time_start = microtime(true);

... Ici l'action à mesurer ...

$time_end = microtime(true);
$time = $time_end - $time_start;
echo &quot;Temps d'exécution de l'action mesurée : $time secondes\n&quot;;

...

?&gt;</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/scripts/wrapper_monit">
        <dc:format>text/html</dc:format>
        <dc:date>2010-01-08T14:06:08+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:scripts:wrapper_monit - créée</title>
        <link>http://marco.adeti.org/libre/scripts/wrapper_monit</link>
        <description>Exemple de wrapper pour monitoring


#!/usr/bin/perl

use strict;
use POSIX qw(strftime);
use Time::Local;

##
## Globals :
##

##
## VERY IMPORTANT : Set here the list of commands allowed to exec by the script.
##
## For example : my @commands_allowed = (&quot;/scripts/mycommand.sh&quot;);
my @commands_allowed = (&quot;/scripts/macommande1.pl&quot;,&quot;/scripts/macommande2.sh&quot;);

## Nagios POSIX Return values :
my $OK          = 0;
my $WARNING     = 1;
my $CRITICAL    = 2;
my $UNKNOW      = 3;

##
## EDIT FOLLOWING P…</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/scripts/ssh_wrapper_clefs_backup">
        <dc:format>text/html</dc:format>
        <dc:date>2010-01-08T13:41:34+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:scripts:ssh_wrapper_clefs_backup</title>
        <link>http://marco.adeti.org/libre/scripts/ssh_wrapper_clefs_backup</link>
        <description>.ssh/authorized_keys avec prédéfinition d'un commande comme wrapper.


command=&quot;/sbin/monwrapper.sh mamachine&quot; ssh-dss shouxee7oohoh3ouvaoghaighi4naeBied9ieyaeviek7aequai7ze4gahgaeS3mooYee9iaPie7ip7een9Cech9ure7iewie9vai3theeGhi7Rieceeb9iaMoh9Quia root@mamachine</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/systeme/subversion/installation">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-29T15:25:12+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:systeme:subversion:installation</title>
        <link>http://marco.adeti.org/libre/systeme/subversion/installation</link>
        <description>apt-get install subversion subversion-tools



svnadmin create /usr/local/svn/repository_name


Create a Startup Script


Il faut créer le script de démarrage /etc/init.d/svnserve :


svnserve -d -r /usr/local/svn/repository_name


Save your file and you're done.</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/scripts/supprimer_ligne_fichier">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-24T11:08:50+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:scripts:supprimer_ligne_fichier</title>
        <link>http://marco.adeti.org/libre/scripts/supprimer_ligne_fichier</link>
        <description>Supprimer la 30è ligne d'un fichier :


sed -i  '30d' /home/mondossier/.ssh/known_hosts</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/supervision/nagios_permettre_commandes_externes">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-22T17:25:07+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:supervision:nagios_permettre_commandes_externes</title>
        <link>http://marco.adeti.org/libre/supervision/nagios_permettre_commandes_externes</link>
        <description>!! Penser à valide paramètre dans nagios.cfg : check_external_commands=1


Problem:
  When external commands are enabled, and accessing a page that requieres to write 'nagios.cmd', it displays the following error:

Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!
 
  The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
 
  An error occurred while attempting to commit your command for processing.</description>
    </item>
    <item rdf:about="http://marco.adeti.org/libre/supervision/centreon">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-22T12:24:15+01:00</dc:date>
        <dc:creator>Marco RODRIGUES</dc:creator>
        <title>libre:supervision:centreon</title>
        <link>http://marco.adeti.org/libre/supervision/centreon</link>
        <description>Sur une installation Debian de base avec l'installation de nagios via le système de paquets changer au préalable le shell de l'utilisateur “nagios” de ”/bin/false” en ”/bin/sh”. Sinon les daemons de centreon ne pourront se lancer.


	*  préparation de l'installation :</description>
    </item>
</rdf:RDF>
