Skip to content

Webalizer

Webalizer

Webalizer is a web server log file analysis program, which produces usage statistics in HTML format for viewing with a browser. The results are presented in both columnar and graphical format, which facilitates interpretation. Yearly, monthly, daily and hourly usage statistics are presented, along with the ability to display usage by site, URL, referrer, user agent, browser and country, user agent and referrer are only available if your web server produces Combined log format files. The person who write this program can be reached with Bradford L. Barrett, brad@mrunix.net.

  1. Webalizer RPM is installed by default. Uninstall Webalizer
    rpm –e webalizer

  2. Install GeoIP library

    1. tar –zxvf /usr/src/GeoIP.tar.gz
    2. cd /usr/src/GeoIP-version
    3. ./configure
    4. make
    5. make install
  3. Install and patch Webalizer with geolizer

    1. tar –zxvf /usr/src/webalizer-2.01-10-src.tgz
    2. tar –zxvf /usr/src/geolizer_2.01-10-patch.20040216.tar.gz
    3. cd /usr/src
    4. patch –p0 < /usr/src/geolizer_2.01-10-patch/geolizer.patch
    5. rpm –Uvh /usr/src/libpng-devel-1.2.7-1.i386.rpm
    6. rpm –Uvh /usr/src/gd-devel-2.0.28-4.i386.rpm
    7. Add share libraries path /usr/lib to /etc/ld.so.conf
    8. ldconfig
    9. cd /usr/src/webalizer-2.01-10
    10. ./configure –-enable-geoip
    11. make
    12. make install
  4. Webalizer configuration file webalizer.conf.sample can be found in /etc

  5. Create a folder to host respective webalizer configure file for each virtual hosting, mkdir /etc/webalizer

  6. mv /etc/webalizer.conf.sample
    /etc/webalizer/_webalizer.conf

  7. vi /etc/webalizer/_webalizer.conf

    TopCountries 300 GeoIP yes GeoIPDatabase /usr/local/share/GeoIP/GeoIP.dat LogFile /etc/httpd/logs/<user>_access_log LogType clf OutputDir /home/<user>/web/stats HistoryName webalizer.hist Incremental yes IncrementalName webalizer.current ReportTitle Usage Statistics for HostName <Hostname> PageType cgi PageType php PageType shtml HTMLBody <BODY CLASS="body" BGCOLOR="#E8E8E8" LINK="#0000FF" VLINK="#FF0000"> HTMLBody <STYLE type=text/css> HTMLBody BODY.body {font-family: Helvetica, Arial}A:hover {color: #4F709F} HTMLBody </STYLE> Quiet yes FoldSeqErr yes HideURL *.gif HideURL *.GIF HideURL *.jpg HideURL *.JPG HideURL *.png HideURL *.PNG HideURL *.ra SearchEngine yahoo.com p= SearchEngine altavista.com q= SearchEngine google.com q= SearchEngine eureka.com q= SearchEngine lycos.com query= SearchEngine hotbot.com MT= SearchEngine msn.com MT= 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
  8. To update GeoIP.dat in future:
    wget -P /usr/src http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz

    gunzip /usr/src/GeoIP.dat.gz

    mv /usr/src/GeoIP.dat /usr/local/share/GeoIP/GeoIP.dat

  9. Run webalizer, webalizer –c /etc/webalizer/<user>_webalizer.conf
    You may want to add shared libraries path for libGeoIp into /etc/ld.so.conf
    By default, libGeoIP library is installed in /usr/local/lib. Run ldconfig after changes.

    Add a crontab entry as follow (runs everyday at 0010am):

    10 0 * * * for i in /etc/webalizer/*.conf; do /usr/local/bin/webalizer -d –c $i; done

Categories: Lesson, Linux, Server, Solution, Web Hosting.

Comment Feed

3 Responses

  1. Fun. Add to your bookmarks. And how long it took to write articles?

  2. Just some words about WebAlizer…

    I don’t like it very much.
    It’s rather good and does’t cost anything.
    BUT:
    1) the stats it gives is incorrect very often
    2) some logs of WA are ref spamed, what may cause even DDOS of the site

    But its not difficult to tune WA that way so it will work correctly!

  3. Hello, just a question?? this work to centos ?



Some HTML is OK

or, reply to this post via trackback.