Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
webalizer [Le 02/05/2009, 12:42] – jmercanton | webalizer [Le 07/01/2013, 16:16] (Version actuelle) – faute de français flomoto | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ===== Webalizer ===== | ||
+ | <note tip> | ||
+ | <note tip> | ||
+ | |||
+ | |||
+ | Le tutoriel ci dessous vous explique comment installer webalizer sur une machine dotée du proxy squid | ||
+ | |||
+ | |||
+ | **Depuis Webmin** | ||
+ | |||
+ | Webalizer nécessite un dossier, à indiquer dans Webmin, dans lequel il enregistrera les rapports générés. Créez donc un dossier '' | ||
+ | |||
+ | mkdir ~/webalizer | ||
+ | |||
+ | Puis installez le depuis la console webmin | ||
+ | |||
+ | **Depuis les sources** | ||
+ | |||
+ | Il est fortement conseillé d' | ||
+ | |||
+ | pour cela téléchargeons d' | ||
+ | |||
+ | wget ftp:// | ||
+ | |||
+ | ensuite décompressons l' | ||
+ | |||
+ | tar -zxvf webalizer-2.21-02-src.tgz | ||
+ | |||
+ | Vous obtenez alors le répertoire webalizer-2.21-02 | ||
+ | On y accède: | ||
+ | |||
+ | cd webalizer-2.21-02 | ||
+ | |||
+ | A ce stade, il est nécessaire d' | ||
+ | |||
+ | <note important> | ||
+ | configure: error: z library not found.. please install libz | ||
+ | ** vous indique que la librairie libz doit être installée avant de compiler.</ | ||
+ | |||
+ | sudo apt-get install zlib1g-dev | ||
+ | sudo apt-get install libpng12-dev | ||
+ | sudo apt-get install libgd2-noxpm-dev | ||
+ | |||
+ | Une fois ceci fait, on compile | ||
+ | |||
+ | ./configure --with-language=french | ||
+ | make | ||
+ | sudo make install | ||
+ | |||
+ | L' | ||
+ | |||
+ | Copions le afin d' | ||
+ | |||
+ | cd / | ||
+ | | ||
+ | sudo cp webalizer.conf.sample webalizer.conf | ||
+ | |||
+ | Puis éditons le afin de le modifier | ||
+ | |||
+ | sudo nano webalizer.conf | ||
+ | |||
+ | Voici les lignes à décommenter/ | ||
+ | |||
+ | LogFile | ||
+ | OutputDir | ||
+ | HistoryName | ||
+ | Incremental | ||
+ | IncrementalName webalizer.current | ||
+ | ReportTitle | ||
+ | HostName | ||
+ | PageType | ||
+ | PageType | ||
+ | HTAccess | ||
+ | LinkReferrer | ||
+ | TopSites | ||
+ | TopKSites | ||
+ | TopURLs | ||
+ | TopKURLs | ||
+ | TopReferrers | ||
+ | TopAgents | ||
+ | TopCountries | ||
+ | TopEntry | ||
+ | TopExit | ||
+ | TopSearch | ||
+ | TopUsers | ||
+ | ideSite | ||
+ | HideSite | ||
+ | HideSite | ||
+ | HideReferrer | ||
+ | HideReferrer | ||
+ | HideURL | ||
+ | HideURL | ||
+ | HideURL | ||
+ | HideURL | ||
+ | HideURL | ||
+ | HideURL | ||
+ | HideURL | ||
+ | IgnoreSite | ||
+ | IgnoreURL | ||
+ | SearchEngine.yahoo.com.p= | ||
+ | SearchEngine.altavista.com.q= | ||
+ | SearchEngine.google.com.q= | ||
+ | SearchEngine.google.fr.q= | ||
+ | SearchEngine.google.be.q= | ||
+ | SearchEngine.google.ca.q= | ||
+ | SearchEngine.google.co.ma.q= | ||
+ | SearchEngine.google.co.uk.q= | ||
+ | SearchEngine.eureka.com.q= | ||
+ | SearchEngine.google.ch.q= | ||
+ | SearchEngine.lycos.com.query= | ||
+ | SearchEngine.hotbot.com.MT= | ||
+ | SearchEngine.search.live.com.q= | ||
+ | SearchEngine.search.msn.com.q= | ||
+ | SearchEngine.infoseek.com.qt= | ||
+ | SearchEngine.webcrawler.searchText= | ||
+ | SearchEngine.excite..search= | ||
+ | SearchEngine.netscape.com.search= | ||
+ | SearchEngine.mamma.com.query= | ||
+ | SearchEngine.alltheweb.com.query= | ||
+ | SearchEngine.northernlight.com.qr= | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | Nous avons enfin notre fichier de configuration prêt, avec dans mon exemple les résultats qui s' | ||
+ | |||
+ | Nous pouvons lancer la commande: | ||
+ | |||
+ | sudo webalizer | ||
+ | |||
+ | Webalizer V2.21-02 (Linux 2.6.24-19-server i686) French | ||
+ | Using logfile / | ||
+ | Creating output in / | ||
+ | Hostname for reports is ' | ||
+ | Reading history file... webalizer.hist | ||
+ | Reading previous run data... webalizer.current | ||
+ | Saving current run data... [03/18/2009 13:51:06] | ||
+ | Generating report for Mars 2009 | ||
+ | Saving history information... | ||
+ | Generating summary report | ||
+ | 7293 records (3378 ignored) in 1 seconds, 7293/sec | ||
+ | |||
+ | Vous n' | ||
+ | |||
+ | Vérifions que le rapport à bien été généré | ||
+ | |||
+ | cd / | ||
+ | ls -l | ||
+ | |||
+ | Qui me donne: | ||
+ | |||
+ | -rw-r--r-- 1 root root 2186 2009-03-17 15:48 ctry_usage_200903.png | ||
+ | -rw-r--r-- 1 root root 2823 2009-03-18 13:52 daily_usage_200903.png | ||
+ | -rw-r--r-- 1 root root 2076 2009-03-18 13:52 hourly_usage_200903.png | ||
+ | -rw-r--r-- 1 root root 3762 2009-03-18 13:52 index.html | ||
+ | -rw-r--r-- 1 root root 108635 2009-03-18 13:52 usage_200903.html | ||
+ | -rw-r--r-- 1 root root 2201 2009-03-18 13:52 usage.png | ||
+ | -rw-r--r-- 1 root root 579914 2009-03-18 13:52 webalizer.current | ||
+ | -rw-r--r-- 1 root root 2880 2009-03-18 13:52 webalizer.hist | ||
+ | |||
+ | Accédons y depuis un navigateur web | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Vous obtiendrez normalement cette magnifique page: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Libre à vous ensuite de faire vos recherches selon le mois sélectionné. | ||
+ | |||
+ | |||
+ | **Générer un script pour lancer webalizer tous les jours** | ||
+ | |||
+ | Afin d' | ||
+ | |||
+ | cd / | ||
+ | |||
+ | Puis créez un script: | ||
+ | |||
+ | sudo nano 0logrotate-webalizer | ||
+ | |||
+ | Entrez ensuite les paramètres suivants; | ||
+ | |||
+ | |||
+ | #!/bin/sh | ||
+ | sudo webalizer | ||
+ | / | ||
+ | |||
+ | |||
+ | Le script se lancera donc tous les jours, et exécutera webalizer. | ||
+ | |||
+ | //Auteur : [[: |