Compiling SARG on Ubuntu Dapper

By crmanski

The version of sarg (Squid Analysis Report Generator) that comes with Dapper is a few versions behind the actually released version. This is what I did to compile on a Dapper installation that I had previously done no program compilation on…

  1. Install these packages on the command line…

    sudo apt-get install libgdchart-gd2-xpm-dev build-essential

  2. Download sarg from the website: http://sarg.sourceforge.net/sarg.php and unpack it in a directory. I did this in a terminal in my home directory…

    mkdir packages
    cd pack*
    wget
    http://umn.dl.sourceforge.net/sourceforge/sarg/sarg-2.2.3.1.tar.gz
    gzip -cd sarg-2.2.3.1.tar.gz | tar xvf –
    cd sarg*
    sudo su (this makes you root)
    ./configure –enable-sysconfdir=/etc/squid
    make && make install

  3. As root edit the /etc/squid/sarg.conf file to meet your needs…

    sudo gedit /etc/squid/sarg.conf

  4. then run sarg…

sudo sarg

Webmin(www.webmin.com) has a module that lets you configure the sarg report generation if you prefer a gui.