by Andrés Cabezas (www.domador.net) This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
My favorite webhosting statistics package is Webalizer. Several official updates to the program have been published in the last few months, following several years of silence (as far as releases were concerned.) I wanted to use the latest version in my DreamHost account, but could only find instructions for installing the binaries for an older version. After some trial and error, I managed to compile the latest version. In order to enable all of Webalizer’s features, I had to download and build two other packages. My shared server on DreamHost already had all the other dependencies. (If you are following these instructions on another web hosting provider, you may need to download additional packages, in addition to the ones mentioned here.)
The following steps would create a webalizer directory under your shell account’s home directory. The webalizer/sources subdirectory will house the code for Webalizer’s dependencies (at least the code for programs which aren’t already installed on the server. If you’re using a different hosting provider, you may need to download more packages in addition to the ones mentioned here.) The webalizer/lib will contain the compiled libraries which webalizer will require at runtime. The webalizer binary and webazolver link will be stored in the webalizer directory.
For these instructions, make sure to replace USERNAME with the username corresponding to your own shell account.
A script that performs these commands is also available. You can obtain it at the following web page: http://www.domador.net/build-webalizer-script/
cd /home/USERNAME/webalizer/sources wget http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz tar xvfz bzip2-1.0.5.tar.gz cd bzip2-1.0.5/ make make install PREFIX=/home/USERNAME/webalizer
cd /home/USERNAME/webalizer/sources wget http://download.oracle.com/berkeley-db/db-4.4.20.tar.gz tar xvfz db-4.4.20.tar.gz cd db-4.4.20/build_unix/ ../dist/configure --prefix=/home/USERNAME/webalizer make make install
cd /home/USERNAME/webalizer/sources wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.21-02-src.tgz tar xvfz webalizer-2.21-02-src.tgz cd webalizer-2.21-02/ ./configure --prefix=/home/USERNAME/webalizer --with-language=english --enable-dns --enable-bz2 --enable-geoip --with-bz2lib=/home/USERNAME/webalizer/lib --with-bz2=/home/USERNAME/webalizer/include make make install
cd /home/USERNAME/webalizer cp bin/webalizer . ln -s webalizer webazolver
LD_LIBRARY_PATH=/home/USERNAME/webalizer/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
Step 8 is needed in order for Webalizer to find all the libraries it needs to run. An alternative is to compile Webalizer statically by adding the --enable-static parameter to the configure script. Doing this eliminates the need for step 8. However, the webalizer binary grows in size from 320 kilobytes to 1.9 megabytes. According to the compiler messages, there could be other caveats, which aren’t covered in these instructions.
cd /home/USERNAME/webalizer/sources wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.21-02-src.tgz tar xvfz webalizer-2.21-02-src.tgz cd webalizer-2.21-02/ ./configure --prefix=/home/USERNAME/webalizer --with-language=english --enable-dns --enable-bz2 --enable-geoip --enable-static --with-bz2lib=/home/USERNAME/webalizer/lib --with-bz2=/home/USERNAME/webalizer/include --with-geodb=/usr/share/GeoIP/ make make install
Suggestions for improvement are welcome. Future releases of Webalizer may require updates to the libraries compiled for use with Webalizer.
* These instructions are not guaranteed to enable ringing or whistling support in Webalizer.
Copyright 2009 Andres Cabezas. Some rights reserved.
How to compile Webalizer with all its bells and whistles by Andres Cabezas is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.