Squid wth Sarg



                         I have using the RHEL6

and configure squid squid-3.1.10-19.el6_4.x86_64 package

make yum server on your machine then create the repo file

Now create the yum Server

# mkdir /YUM
copy RHEL6 DVD in YUM Folder
cp -rv /media/DVD/* /YUM

Now create the repo file

# vim /etc/yum.repos.d/yum.repo
[yum]
name=yumserver
baseurl=file:///YUM
gpgcheck=0

file save & quit

next install squid
# yum install squid* -y

go the squid folder and open config file
# vim /etc/squid/squid.conf
and configure yum squid server

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed

acl CONNECT method CONNECT  ==> edit the  below line in this file
acl network src 192.168.0.0/24  => allow your network.
acl siteblock url_regex -i "/etc/squid/web" ==> siteblock for you have block the web site


# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access deny siteblock
http_access allow network
http_access allow localnet
http_access allow localhost

file save & quit

then go to next file and add site you have block.
# vivm /etc/squid/web
yahoo.com
in.yahoo.com
zeenews.india.com
zns.india.com

file save & quit

# /etc/init.d/squid restart
# chkconfig squid on

next step Configure sarg
install httpd pkg.
# yum install http* -y
# cd /var/www/html/
# Download sarg

# http://downloads.sourceforge.net/project/sarg/sarg/sarg-2.3.6/sarg-2.3.6.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsarg%2Ffiles%2Fsarg%2Fsarg-2.3.6%2F&ts=1402987736&use_mirror=cznic
#  tar -zxvf sarg-2.3.6.tar.gz
3. Rename the folder sarg-2.3.6 as:
# mv sarg-2.3.6 squid-reports
4. Now run ./configure command then make and finally run make install command :

5. Now run sarg command  as :
# sarg ( wait untill it stops )
6. The report will be generated automatically under /var/www/html/squid-reports/ . Now access it using below url :

http://your_ip/squid-reports/












Comments

Popular posts from this blog

PCS Corosync Pacemaker Cluster Mariadb using NFS

How to install and configure node js and PM2 in rhel7

How to Create or Configure iSCSI Server and Clinet