How can I manually install webalizer ? If there is any link providing the details to deploy it to multiple domains. Any help will be highly appreciated.
How can I manually install webalizer ? If there is any link providing the details to deploy it to multiple domains. Any help will be highly appreciated.
What is Webalizer: (for those wondering)
Webalizer is a fast, free web server log file analysis program, written in C, which produces highly detailed, easily configurable usage reports in HTML format. It was written to solve several problems with currently available analysis packages.
Webalizer Features:
Webalizer Installation:
There are a few ways to install Webalizer - such as apt-get, yum, and of course from source.
installing via apt-get or yum is as simple as just running the command
yum -y install webalizer or apt-get install webalizer -y
Installing through sourcecode
First we need to download the webalizer sourcode first:
wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.23-03-src.tgz
Now lets uncompress it
tar zxvf webalizer*
Makesure you have gcc compiler and Gd library installed, you can installed it using yum
yum install gcc gcc-c++ gd-devel
Now go into the webalizer* directory , compile and install it
cd webalizer* ./configure make make install
It is installed and you can checked the version now
WEBALIZER CONFIGURATION (single domain)
Create a central directory for the webalizer configuration files
mkdir /etc/webalizer
Create two webalizer configuration files, a.example.conf from the sample file and put it into /etc/webalizer directory. You need to locate the webalizer.conf.sample files and copy it to /etc/webalizer directory
cp /usr/local/etc/webalizer.conf.sample /etc/webalizer/a.example.com.conf
Modify LogFile, OutputDir and HostName of the webalizer config files. For example, fora.example.com.conf
vi /etc/webalizer/a.example.com.conf
and changes the content
Note:You may want to specify other settings specific to the domain, such as HideReferrer,HideSite, etc.
To process all the virtual sites, run the following command:
for i in /etc/webalizer/*.conf; do webalizer -c $i; done
Now you can see the webalizer files on your site, example :
http://domainname.org/webalizer/usage_20100811.html
How to set Webalizer on multiple virtual domain :
Tha above tutorial are to set the webalizer for singel domain, how about if you needed to create webalizer for multiple domain ? , you need to makesure that you have create custom log on your every virtual domain setting on httpd.conf it is usually on /usr/local/apache/conf/httpd.conf , here is the eample :
as you can see above, we have set the custom log on /home/domains/test.com/logs/access_log , please also make sure you have create the /home/domains/test.com/logs directory and set the permission was set for domains users
-rw-r--r-- 1 domains users 677485 Dec 1 14:45 access_log then set the log path on your webalizer conf on /etc/webalizer/
LogFile /home/domains/test.com/logs/access_log then set it per virtual domain that you have :)
and last thing , restart the httpd , if you are using rpm
You should see the size of the access_logs on /home/domains/test.com/logs/access_log increase , if not checked the permission and webalizer config on /etc/webalizer/test.com.conf
Do not forget to add cron so the webalizer can be udpated automaticly
add
i will set the crontab every 1 hour to execute the shell script on /root/dowebalizer
Now create the shell script on /root/dowebalizer
enter the following:
hit escape and save with w!
did this help you? if so - leave a comment, grade it - and tag it :-)