Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Install the latest Analog web tracking program UNIX
[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.
% 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.gz
Uncompress it:
% gnutar xzf analog-5.02.tar.gz
2. Configuring
% cd /etc/httpd/analog-5.02
Edit 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/Documents
Edit /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_log
Go back to the Analog-5.02 directory.
cd /etc/httpd/analog-5.02
Edit 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-Executables
3.Make

Go to the directory 'src' within 'Analog-5.02'
% cd src
Edit 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
% make
You're done!!!!

Point you browser to your.domain.com/anlgform.html and hit the Produce Statistics...
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[4,888 views]  

Install the latest Analog web tracking program | 1 comments | Create New Account
Click here to return to the 'Install the latest Analog web tracking program' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Install the latest Analog web tracking program
Authored by: LouieNet on May 28, '05 08:37:20PM
A couple thoughts:
  1. Analog has moved to http://www.analog.cx/
  2. Alternatively, you can install from fink now.
Louie

---
G4 cube, 1.5GB RAM, OS X 10.3.9
17" Powerbook G4, 1G RAM, OS X 10.3.9
Mac mini, 1 GB RAM, OS X 10.3.9

[ Reply to This | # ]