How to setup SquidAnalyzer on Centos.

Today we setup SquidAnalyzer for watch log of squid.
Step 1.  Make folder and download

mkdir /opt/squidanalyzer
cd /opt/squidanalyzer
yum install gd make libpng perl-ExUtils-MakeMaker perl-GD-Graph perl-GD-Graph3d perl-TimesHiRes

Step 2. Download file and install:

wget https://downloads.sourceforge.net/project/squid-report/squid-report/6.5/squidanalyzer-6.5.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquid-report%2F&ts=1490960374&use_mirror=netix
mv squidanalyzer-6.5.tar.gz\?r\=https\:%2F%2Fsourceforge.net%2Fprojects%2Fsquid-report%2F squidanalyzer-6.5.tar.gz
tar -zxvf squidanalyzer-6.5.tar.gz
cd squid*
perl Makefile.PL
make
make install

Step 3. Now make copy to original config file and config:

cp /etc/squidanalyzer/squidanalyzer.conf /etc/squidanalyzer/squidanalyzer.conf.orig

Edit config file with this options:
vim /etc/squidanalyzer/squidanalyzer.conf

# Path where SquidAnalyzer should dump all HTML and images files.
# Choose a path that can be read by a Web browser
Output /var/www/html/squidanalyzer

# The URL of the SquidAnalyzer javascript, HTML and images files.
## WebUrl /squidreport
WebUrl /squidanalyzer

# Set the path to the Squid, squidGuard and/or ufdbGuard log files
## LogFile /var/log/squid3/access.log
LogFile /var/log/squid/access.log
………………………………………
# Cost of the bandwith per Mb. If you want to generate invoice per Mb
# for bandwith traffic this can help you. Value 0 mean no cost.
# CostPrice 0.5
CostPrice 0

Step 4. Edit network-aliases of SquidAnalyzer.
vim /etc/squidanalyzer/network-aliases

#
# See examples below.
#
#——————————————————————————-
#Home Network 192\.168\.1\.
#Associated Networks ^10\.169\.[2-4]\.,^10\.169\.[7-9]\.
#ClassB Network 10.172.0.0/16
#ClassC Network 192.168.1.0/24
Custom Network 192.168.18.1/24

Step 5. add to crontab daily to update

vim /etc/crontab

# SquidAnalyzer log reporting daily
0 2 * * * root /usr/local/bin/squid-analyzer > /dev/null 2>&1

To generate file execute /usr/local/bin/squid-analyzer  and wait.

To see page with go to http://192.168.18.1/squidanalyzer/ ,  you can setup .htpasswd access secure this page.

Source information for this page: YouToube