LinuxQuestions.org
Help answer threads with 0 replies.
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, 04:55 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
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 04:57 AM.
 
Old 12-24-2010, 06:00 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 06:06 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 06:06 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
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, 06:11 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 12:10 PM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
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 12:40 PM.
 
Old 12-24-2010, 12:18 PM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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-24-2010, 11:22 PM   #8
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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 11:18 AM
Guidance gnosis1.7 Linux - Newbie 3 08-27-2007 01:02 AM
Writing to a CD - Need guidance sreeramabsc Linux - Hardware 1 02-14-2006 10:27 PM
Some Guidance Please! AdykOSu Linux - Newbie 4 12-22-2005 05:26 PM
Guidance about Fedora 2639 Fedora 5 04-26-2005 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:15 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
Open Source Consulting | Domain Registration