[Editor: If you run a webserver on your OS X box, you might want to take a look at Analog, one of the better and more widely used weblog analyzers. Read the rest of this article if you'd like the detailed step-by-step instructions needed to get it running on OS X. You'll need to have the developer tools installed, and should be comfortable working in the terminal window before you try this install (it's not overly complicated, but it does involve editing and compiling UNIX source files).
Thanks to Commet for contributing this how-to. -rob.]
1. Get the sourcecode
Go with the commandline to the directory wher you would like to install Analog. I've chosen /etc/httpd/, because there is all the the apache stuff.
Copy the 'anlgform.html' and 'images' to to where you store your webpages. I put them in /Library/Webserver/Documents.
Normaly you only have to change the path to you "access_log" file. For me it is in /var/log/httpd/access_log. Find yours with:
# 1) uncomment (remove everything before $analog) and edit one of the next two
# lines to give the location (full pathname) of the analog executable.
# Unix: $analog = '/usr/local/etc/httpd/analog-5.02/analog';
# Windows: $analog = 'C:program filesanalog 5.02analog.exe';
Change it to:
# 1) uncomment (remove everything before $analog) and edit one of the next two
# lines to give the location (full pathname) of the analog executable.
$analog = '/etc/httpd/analog-5.02/analog';
# Windows: $analog = 'C:program filesanalog 5.02analog.exe';
Make sure if you didn't put Analog in /etc/httpd that you change it to the path where you have put it...
Copy anlgform.pl to /Library/Webserver/CGI-Executables
Go to the directory 'src' within 'Analog-5.02'
#ifndef HOSTNAME
#define HOSTNAME "[your.site.name]"
#ifndef HOSTURL
#define HOSTURL "http://your.url.com"
#ifndef IMAGEDIR
#define IMAGEDIR "/images/"
#ifndef STYLESHEET
#define STYLESHEET "path_to_your_stylesheet.css"
*Note the path that is used is the path from the root directory of your webserver
Edit the 'makefile' and change the following:
CC = cc
DEFS =
OS = OSX
LIBS = -lm
*Note about LIBS:
For some reason I can't get it to compile with the (graphic) libraries from Darwin so there won't be any pie chart in the statistics (you could try to install the gnu libs like libjpeg which can be found in at http://softrak.stepwise.com/Softrak in the darwin section under X windows...
But it would be nicer if some how we could use the libraries from darwin... anyone?
Make
First get out the src directory
Point you browser to your.domain.com/anlgform.html and hit the Produce Statistics...
Thanks to Commet for contributing this how-to. -rob.]
1. Get the sourcecode
Go with the commandline to the directory wher you would like to install Analog. I've chosen /etc/httpd/, because there is all the the apache stuff.
% cd /etc/httpd/Get the source code (from http://www.statslab.cam.ac.uk/~sret1/analog/)
% wget http:/www.statslab.cam.ac.uk/~sret1/analog/analog-5.02.tar.gzUncompress it:
% gnutar xzf analog-5.02.tar.gz2. Configuring
% cd /etc/httpd/analog-5.02Edit analog.cfg (for example when you use php, uncomment '# PAGEINCLUDE *.php' to 'PAGEINCLUDE *.php').
Copy the 'anlgform.html' and 'images' to to where you store your webpages. I put them in /Library/Webserver/Documents.
% cp anlgform.html images /Library/Webserver/DocumentsEdit /Library/Webserver/Documents/anlgform.html
Normaly you only have to change the path to you "access_log" file. For me it is in /var/log/httpd/access_log. Find yours with:
sudo find / -name access_logGo back to the Analog-5.02 directory.
cd /etc/httpd/analog-5.02Edit anlgform.pl
# 1) uncomment (remove everything before $analog) and edit one of the next two
# lines to give the location (full pathname) of the analog executable.
# Unix: $analog = '/usr/local/etc/httpd/analog-5.02/analog';
# Windows: $analog = 'C:program filesanalog 5.02analog.exe';
Change it to:
# 1) uncomment (remove everything before $analog) and edit one of the next two
# lines to give the location (full pathname) of the analog executable.
$analog = '/etc/httpd/analog-5.02/analog';
# Windows: $analog = 'C:program filesanalog 5.02analog.exe';
Make sure if you didn't put Analog in /etc/httpd that you change it to the path where you have put it...
Copy anlgform.pl to /Library/Webserver/CGI-Executables
% cp anlgform.pl /Library/Webserver/CGI-Executables3.Make
Go to the directory 'src' within 'Analog-5.02'
% cd srcEdit anlghead.h:
#ifndef HOSTNAME
#define HOSTNAME "[your.site.name]"
#ifndef HOSTURL
#define HOSTURL "http://your.url.com"
#ifndef IMAGEDIR
#define IMAGEDIR "/images/"
#ifndef STYLESHEET
#define STYLESHEET "path_to_your_stylesheet.css"
*Note the path that is used is the path from the root directory of your webserver
Edit the 'makefile' and change the following:
CC = cc
DEFS =
OS = OSX
LIBS = -lm
*Note about LIBS:
For some reason I can't get it to compile with the (graphic) libraries from Darwin so there won't be any pie chart in the statistics (you could try to install the gnu libs like libjpeg which can be found in at http://softrak.stepwise.com/Softrak in the darwin section under X windows...
But it would be nicer if some how we could use the libraries from darwin... anyone?
Make
First get out the src directory
% cd ../and then
% makeYou're done!!!!
Point you browser to your.domain.com/anlgform.html and hit the Produce Statistics...
•
[4,911 views]

