Awstats
Aus Fedorawiki.de
| |
Dieser Artikel wurde neu erstellt und bedarf evtl. noch einer Korrekturlesung. Danach kann diese Box entfernt werden. |
Webstatistiken können auf unterschiedliche Arten erstellt werden. Es gibt die Möglichkeit die Log-Files des Server auszuwerten oder die Nutzer per Tracking auf der Webseite zu verfolgen. awstats und Webalizer analysieren die Log-Dateien.
So lassen sich Informationen über die Seitensichtung (Page Impression) und Besuche (Visits) grafisch darstellen, ebenso ist es möglich die verwendetet Technik der Besucher, ihre Herkunft, ihren Browser-Typ und spezielle Funktionen, welche sie aktiviert haben, zu erfassen.
Inhaltsverzeichnis |
Installation
Die Installation ist mit yum, pirut oder yumex schnell erledigt.
Konfiguration
Nach dem Wechseln in das Verzeichnis /usr/share/awstats/tools/ kann dort das Konfigurations-Skript aufgerufen werden.
cd /usr/share/awstats/tools/
und das Skript ausführen.
Es werden nun diverse Einstellungen abgefragt, welche gemäss den eignen System angegeben werden müssen.
----- AWStats awstats_configure 1.0 (build 1.6) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS detected: Linux, BSD or Unix
-----> Check for web server install
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
Hier muss nun der korrekte Pfad angegeben werden /etc/httpd/conf/httpd.conf
-----> Check and complete web server config file '/etc/httpd/conf/httpd.conf' Add 'Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/"' Add 'Alias /awstatscss "/usr/share/awstats/wwwroot/css/"' Add 'Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/"' Add 'ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/"' Add '<Directory>' directive AWStats directives added to Apache config file. -----> Update model config file '/etc/awstats/awstats.model.conf' File awstats.model.conf updated. -----> Need to create a new config file ? Do you want me to build a new AWStats config/profile
Mit Yes beantworten, damit ein neues Profil für das System angelegt wird.
-----> Define config file name to create What is the name of your web site or profile analysis ? Example: www.mysite.com Example: demo Your web site, virtual server or profile name:
An dieser Stelle muss der FQDN des Systems angeben werden.
-----> Define config file path In which directory do you plan to store your config file(s) ? Default: /etc/awstats Directory path to store config file(s) (Enter for default):
Da die Standard-Einstellungen in Ordnung ist, weiter mit Enter
-----> Create config file '/etc/awstats/awstats.testserver03.testnet.bernewireless.net.conf' Config file /etc/awstats/awstats.testserver03.testnet.bernewireless.net.conf created. -----> Restart Web server with '/sbin/service httpd restart' [Sat Apr 14 23:55:49 2007] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 995 will probably never match because it overlaps an earlier Alias. [Sat Apr 14 23:55:49 2007] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 996 will probably never match because it overlaps an earlier Alias. [Sat Apr 14 23:55:49 2007] [warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 997 will probably never match because it overlaps an earlier Alias. [Sat Apr 14 23:55:49 2007] [warn] The ScriptAlias directive in /etc/httpd/conf/httpd.conf at line 998 will probably never match because it overlaps an earlier ScriptAlias. httpd beenden: [ OK ] httpd starten: [ OK ] -----> Add update process inside a scheduler Sorry, configure.pl does not support automatic add to cron yet. You can do it manually by adding the following command to your cron: /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -update -config=testserver03.testnet.bernewireless.net Or if you have several config files and prefer having only one command: /usr/share/awstats/tools/awstats_updateall.pl now Press ENTER to continue...
mit Enter geht es weiter.
A SIMPLE config file has been created: /etc/awstats/awstats.testserver03.testnet.bernewireless.net.conf You should have a look inside to check and change manually main parameters. You can then manually update your statistics for 'testserver03.testnet.bernewireless.net' with command: > perl awstats.pl -update -config=testserver03.testnet.bernewireless.net You can also read your statistics for 'testserver03.testnet.bernewireless.net' with URL: > http://localhost/awstats/awstats.pl?config=testserver03.testnet.bernewireless.net Press ENTER to finish...
Durch Drücken von Enter wird die Konfiguration abgeschlossen.
Update
Ein manuelles Update der Daten ist möglich.
perl awstats.pl -update -config=testserver03.testnet.bernewireless.net
Durch dieses Kommando werden alle Daten aktualisiert.
perl /usr/share/awstats/tools/awstats_updateall.pl now
Automatisieren der Aktualisierung
Das automatische Aktualisieren ist in der Mehrzahl der Fälle der bevorzugte Weg. Dazu muss Cron angepasst werden, resp. /etc/cron.d/.
crontab -e
Für ein System
*/5 * * * * /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -update -config=testserver03.testnet.bernewireless.net
Existieren mehrere Konfigurationen, kann awstats_updateall.pl verwendet werden.
*/5 * * * * /usr/share/awstats/tools/awstats_updateall.pl now
Verwendung
Nun werden die Daten über die Zugriffe auf den Webserver zusammengetragen und können auf einer Übersichtsseite angesehen werden.
http://localhost/awstats/awstats.pl?config=testserver03.testnet.bernewireless.net
Der FQDN muss natürlich an die eigenen Gegebenheiten angepasst werden.
Links