LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   squid guidance (https://www.linuxquestions.org/questions/linux-newbie-8/squid-guidance-852187/)

gardenair 12-24-2010 04:55 AM

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.

divyashree 12-24-2010 06:00 AM

Quote:

Originally Posted by gardenair (Post 4201968)
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.

repo 12-24-2010 06:06 AM

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

gardenair 12-24-2010 06:06 AM

thanks for the reply . well what about

chown squid:squid /cache
chmod 750 /cache


and

squid -z

kindly guide me this as well
thanks.

repo 12-24-2010 06:11 AM

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

gardenair 12-24-2010 12:10 PM

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.

repo 12-24-2010 12:18 PM

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

divyashree 12-24-2010 11:22 PM

Dear gardenair, please read the man pages of the commands to know about the commands.


All times are GMT -5. The time now is 09:42 PM.