LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2010, 05:55 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Rep: Reputation: 31
squid guidance


I need some help regarding to squid proxy server. well if you view the following web site
http://pbraun.nethence.com/doc/www/squid.html
you can see the all settings which need for squid as a cache server.I want to know some few things about it in
Prepare the system,
mv /var/spool/squid /var/spool/squid.dist
mkdir /cache
chown squid:squid /cache
chmod 750 /cache
why the user use the mv command ?


and in the following

Prepare the file,
mv /etc/squid/squid.conf /etc/squid/squid.conf.dist
sed '/^#/d;/^$/d' /etc/squid/squid.conf.dist > /etc/squid/squid.conf
chown root:squid squid.conf
chmod 640 squid.conf


again the user use the mv coomand to move the file.why he use sed command ?About chown command is the user assigning rights of squid files to the root ?
and last think i want to know that what does squid -z do ?
kindly guide me ,
should be grateful to you
garden.

Last edited by gardenair; 12-24-2010 at 05:57 AM.
 
Old 12-24-2010, 07:00 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by gardenair View Post
I need some help regarding to squid proxy server. well if you view the following web site
http://pbraun.nethence.com/doc/www/squid.html
you can see the all settings which need for squid as a cache server.I want to know some few things about it in
Prepare the system,
mv /var/spool/squid /var/spool/squid.dist
mkdir /cache
chown squid:squid /cache
chmod 750 /cache
why the user use the mv command ?


and in the following

Prepare the file,
mv /etc/squid/squid.conf /etc/squid/squid.conf.dist
sed '/^#/d;/^$/d' /etc/squid/squid.conf.dist > /etc/squid/squid.conf
chown root:squid squid.conf
chmod 640 squid.conf


again the user use the mv coomand to move the file.why he use sed command ?About chown command is the user assigning rights of squid files to the root ?
and last think i want to know that what does squid -z do ?
kindly guide me ,
should be grateful to you
garden.

Here mv command is used to rename the file squid.conf to squid.conf.dist , so the original file is saved. Now sed is used to remove the # mark and the blank spaces from the squid.conf.dist and save the output in squid.conf.
 
Old 12-24-2010, 07:06 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
why the user use the mv command ?
So the original files will be deleted
Quote:
why he use sed command ?
It will remove the lines containing #
Quote:
About chown command is the user assigning rights of squid files to the root
It will chown to user root and group squid
Quote:
and last think i want to know that what does squid -z do ?
It will create the swap directories


Kind regards
 
1 members found this post helpful.
Old 12-24-2010, 07:06 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks for the reply . well what about

chown squid:squid /cache
chmod 750 /cache


and

squid -z

kindly guide me this as well
thanks.
 
Old 12-24-2010, 07:11 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
chown squid:squid /cache
user squid and group squid
Quote:
chmod 750 /cache
http://en.wikipedia.org/wiki/Chmod
Quote:
squid -z
It will create the swap directories

Kind regards
 
1 members found this post helpful.
Old 12-24-2010, 01:10 PM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks a lot for your guidance.well there is a little confusion about cache directory.mkdir /cache which will create directory and squid -z swap dir.so why need to create dir two times?technically what is the difference between cache and swap dir in sauid?

2- my phycal ram is 4 GB so what should i keep the cache dir size in squid.conf file.
Thaks again for guiding me.

Last edited by gardenair; 12-24-2010 at 01:40 PM.
 
Old 12-24-2010, 01:18 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
You don't need to use them both
Quote:
squid -z
will create what you want with the proper permissions.

Quote:
2- my phycal ram is 4 GB so what should i keep the cache dir size in squid.conf file.
the cache dir will not run in RAM
See
http://wiki.squid-cache.org/SquidFaq...hould_I_use.3F

Kind regards
 
1 members found this post helpful.
Old 12-25-2010, 12:22 AM   #8
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Dear gardenair, please read the man pages of the commands to know about the commands.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need suggestions an guidance sugi2learnlinux LinuxQuestions.org Member Intro 2 09-11-2007 12:18 PM
Guidance gnosis1.7 Linux - Newbie 3 08-27-2007 02:02 AM
Writing to a CD - Need guidance sreeramabsc Linux - Hardware 1 02-14-2006 11:27 PM
Some Guidance Please! AdykOSu Linux - Newbie 4 12-22-2005 06:26 PM
Guidance about Fedora 2639 Fedora 5 04-26-2005 08:23 AM


All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration