Lingkage program

Squid Installation How-To in Slackware

Posted on: April 15, 2007

Squid Installation How-To in Slackware
Document is written to give straightforward steps to install squid web caching server.
Platform: Linux Slackware
Squid version: Squid-2.6-Stable-12
Steps:
a)Download Squid Source and Patches
Get squid latest source from http://www.squid-cache.org/Versions/v2/2.6/
# cd /home/
# wget http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE12.tar.gz
# tar -xvzf squid-2.6.STABLE12.tar.gz
# cd squid-2.6.STABLE12
Apply the patches as,
# patch -p1 ..
b) Building Squid
Configure squid cache server and build based on your requirement. For default configuration,
# ./configure –prefix=/squid/ –sysconfdir=/etc/ –enable-gnuregex –enable-async-io=16 –with-aufs-threads=16 –with-pthreads –with-aio –with-dl –enable-storeio=aufs –enable-removal-policies=heap –enable-delay-pools –disable-wccp –enable-cache-digests –enable-default-err-languages=English –enable-err-languages=English –enable-linux-netfilter –disable-ident-lookups –disable-hostname-checks –enable-underscores –enable-snmp –enable-useragent-log –disable-wccpv2 –enable-epoll –disable-internal-dns –enable-htcp
# make
# make install
Note: If you find problem during configuration, act based upon the input given. If you could not solve it, please send your queries or problem to squidrunner_dev@yahoo.com or pufferfish@lycos.com
c)Configuring Squid
With default configuration of squid installation, squid is installed in /squid/ directory. Before starting squid, we have to change configuration file and ownership.
i)Check squid user availability
# id squid
Has to return user information with group details.
If you find Cann’t find user squid then,
# groupadd squid
# useradd -g squid squid
ii)Editing squid configuration file (squid.conf) for Proxy Mode
Get your machine hostname or Fully Qualified Domain Name as,
# hostname
Open /etc/squid.conf with vi editor or view or vim as,
# vi /etc/squid.conf
Turn vi editor to Insert mode by pressing “i” character on keyboard
visible_hostname “your hostname”
cache_effective_user squid
cache_effetive_group squid
iii)Changing directory permission
Change /squid/var/ directory with permission to squid:squid as,
# chown -R squid:squid /squid/var
d) Creating swap directories and starting Squid
During first time startup of squid, you have to create swap directories as,
# /squid/sbin/squid -z
Note: If you find problem during swap directories creation, act based upon the input given. If you could not solve it, please send your queries or problem to pufferfish@lycos.com
Start squid in non-deamon and debug mode as,
# /squid/sbin/squid -NCd10
If you get “Ready to server Requests” message then our squid installation is successful.
Troubleshooting Note:
Sometimes you may find problem to start squid because of DNS server resolvation, then you can start it by disabling INTERNAL DNS lookup as,
# /squid/sbin/squid -NCd10 -D
e)Starting Squid in Daemon Mode
Start squid in daemon as,
# /squid/sbin/squid
f)Stopping / Reconfiguration / status check on squid
To stop squid,
# /squid/sbin/squid -k shutdown
To reconfigure squid configuration file of squid.conf,
# /squid/sbin/squid -k reconfigure
To check whether squid is running or not,
# /squid/sbin/squid -k check
g)Maintenance of squid
i)Log rotation of squid is needed. Squid will generate error logs, web access logs and disk access logs. Log rotation is needed to handle disk usage effectively. We can rotate them as,
# /squid/sbin/squid -k rotate
Note: It is good to archive older logs to save disk space.
ii)Put system start-up script for squid so that squid will be started on every reboot of machine.
in slackware put in /squid/sbin/squid -sYD in /etc/rc.d/rc.local

21 Responses to "Squid Installation How-To in Slackware"

I had an error with this. I have slackware 11 with the 2.16 kernel. Note, I run as root (I am sure I’ll here comments about this).

I believe I followed the directions correctly but when I was at this step
/*
Open /usr/local/squid/etc/squid.conf with vi editor or view or vim as,
# vi /etc/squid.conf
*/
I did not have the directory /user/local/squid. I just edit the /etc/squid.conf file.

So, I kept on following the directions up until I tried to create the swap directory and I get this message:

#/squid/var# /squid/sbin/squid -z

FATAL: Bungled squid.conf line 4409: cache_dir ufs /squid//var/cache 100 16 256
Squid Cache (Version 2.6.STABLE12): Terminated abnormally.

ok i’m make some mistake in my tutorial
right place squid in # /squid editor just in # vi /etc/squid.conf
if you problem in cache_dir ufs /squid//var/cache 100 16 256

before it you make directory cache
#mkdir /squid/var/cache
#chmod 755 /squid/var/cache

if any problem comment again

yes, i would like to be friend with any of squid’s users!

Hmm. Every time I attempt to run this tutorial, I get a hanging error – squid makes it as far as starting, then hangs on the following:

storeLateRelease: released 0 objects

I never get as far as “ready to server” – it just stays on the init screen. Ideas?

Hello,sorry about my English, I installed as your guide on Slackware 12 and Squid 2.7 Stable, I follow the steps until the comments on to create the directory /squid /var/cache ; but I have the error:
FATAL: Bungle (null) line 175: cache_dir ufs /squid/var/cache 100 16 256
If I uncomment cache_dir in squid.conf then I get the error:
FATAL: Bungle squid.conf line 1939: cache_dir ufs /squid/var/cache 100 16 256
You can help me?
thanks.

this error:

FATAL: Bungle (null) line 175: cache_dir ufs /squid/var/cache 100 16 256

because:

–enable-storeio=aufs

then fix with:

cache_dir aufs /squid/var/cache 100 16 256

nice howto, thnks

Great!!! Thanks for sharing.

how to make # /squid/sbin/squid -k rotate run
every one week in crontab…

Squid Cache (Version 2.6.STABLE12): Terminated abnormally.
CPU Usage: 0.001 seconds = 0.000 user + 0.001 sys
Maximum Resident Size: 4032 KB
Page faults with physical i/o: 0
Aborted

If some one wants expert view about running a
blog afterward i recommend him/her to pay a quick visit this blog, Keep
up the pleasant job.

Magnificent beat ! I would like to apprentice at the same time as you amend your site, how can
i subscribe for a blog site? The account helped me a acceptable deal.
I were a little bit acquainted of this your broadcast offered brilliant
clear idea

Just desire to say your article is as amazing. The clarity in your post is
simply excellent and i can assume you are an expert on this subject.

Well with your permission allow me to grab your RSS feed to keep updated with forthcoming post.
Thanks a million and please keep up the rewarding work.

I go to see every day a few sites and websites to read articles
or reviews, but this webpage gives quality based articles.

I am truly happy to glance at this web site posts which includes
plenty of helpful facts, thanks for providing these kinds of data.

Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m
not writing all that over again. Regardless, just wanted to say wonderful
blog!

My partner and I absolutely love your blog and find many of your post’s to be exactly what I’m
looking for. Would you offer guest writers to write content for
yourself? I wouldn’t mind writing a post or elaborating on most of the subjects you write regarding here. Again, awesome website!

whoah this weblog is magnificent i love studying your articles.
Keep up the great work! You understand, lots of people are searching around for this
information, you could aid them greatly.

Hello! Do you know if they make any plugins to protect
against hackers? I’m kinda paranoid about losing everything I’ve worked hard on.
Any suggestions?

I am curious to find out what blog system you’re using? I’m
experiencing some small security issues with my latest site and I would like to
find something more safeguarded. Do you have any solutions?

Hi there, all is going well here and ofcourse every
one is sharing facts, that’s in fact fine, keep up writing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • Order Xtrasize: Hi there, all is going well here and ofcourse every one is sharing facts, that's in fact fine, keep up writing.
  • chatroulette: I am curious to find out what blog system you're using? I'm experiencing some small security issues with my latest site and I would like to find s
  • 3:00 AM: Hello! Do you know if they make any plugins to protect against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any suggest

Categories

%d bloggers like this: