Setting up webalizer in centos 6

I am building this from source.  I realize the package comes with cent but I want to keep it up to date.  If you build your own from source make sure yum doesn’t stomp on it.

Packages needed

gcc, gcc-c++, gd-devel


webalizer source from

GeoIP source from


tar zxvf GeoIP.tar.gz

cd into the directory created


make && make install

tar zxvf webalizer.tar.gz file

cd into directory created

./configure –prefix=/usr/local/webalizer –sysconfdir=/usr/local/etc/webalizer –enable-geoip

make && make install

Setup ld properly

This step prevents this error “error while loading shared libraries: cannot open shared object file: No such file or directory” when running webalizer.

cd /etc/

vi geoip.conf  (This can be named anything.conf)

add “/usr/local/lib” to the file and save it.

Run ldconfig

Update GeoIP database

Download from

gunzip GeoIP.dat.gz

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

Configure webalizer

cd /usr/local/etc/webalizer

cp webalizer.conf.sample

vi and change the following lines

LogFile /var/log/httpd/ point to your access_log file

OutputDir  /var/www/ point to where you want to serve your stats from.  Usually some place under your web root.  You might want to protect it with an htaccess file.


GeoIP yes

GeoIPDatabase /usr/local/share/GeoIP/GeoIP.dat

Run webalizer

/usr/local/webalizer/bin/webalizer -c /usr/local/etc/webalizer/

If it runs fine add to run in your crontab.

Leave a Reply