Koozali.org: home of the SME Server

squid problem ...

i-techzone

squid problem ...
« on: April 11, 2005, 12:25:15 PM »
Hello everyone ...

i have problem to edit /etc/squid/squid.conf.

i need to edit it manually using vi or pico.

but my problem is when i restart the server or clear cache using sme server-manager it will be change back to default.

have anyone can help me ...

Thank you

Offline Brave Dave

  • *
  • 185
  • +0/-0
squid problem ...
« Reply #1 on: April 11, 2005, 01:44:16 PM »
I think the answer is written at the top of /etc/squid/squid.conf

# DO NOT MODIFY THIS FILE!

here is a good place to start
http://no.longer.valid/phpwiki/index.php/Customizing
.:DB:.

i-techzone

squid problem ...
« Reply #2 on: April 11, 2005, 05:45:05 PM »
thanx davidbray,

but i still confius about this matter  ...

if i follow the step in that url, and i edit the squid.conf (not in the /etc/squid/) do i need to do like this command ...

"/sbin/e-smith/db configuration setprop smb ServerString "MyDomain.com SME Server"

something like that ... i meant that i found mostly in this forum we have to add db configuration.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: squid problem ...
« Reply #3 on: April 11, 2005, 05:55:34 PM »
Quote from: "i-techzone"

i need to edit it manually using vi or pico.


You haven't said why, or what the "squid problem" is.

i-techzone

squid problem ...
« Reply #4 on: April 11, 2005, 06:15:23 PM »
erk ... hope u understand my first post.

i meant when i restart the server the squid configuration change to default. but when davidbray ask me to go this url http://no.longer.valid/phpwiki/index.php/Customizing ...

i still don't know how to change the parameter in the /etc/squid/squid.conf. the customizing just show this (something like this):

mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf/squid.conf
cp /etc/e-emith/templates/etc/squid/squid.conf/10ParentCache /etc/e-smith/templates-custom/etc/squid/squid.conf/squid.conf
/sbin/e-smith/expand-template /etc/squid.conf

for this command .. are am i need to edit one by one using the fragment ...

using this command ... where should i put let say http_port 80 3128



p/s: hope u guys understand what i need .. coz first i don't know much about this system configuration a.k.a linux command ... second .. sorry for trouble english ... and third .. i really need how to change all this configuration .. because i just found how to improve the squid performance and i can't save it to this system ...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: squid problem ...
« Reply #5 on: April 11, 2005, 10:31:07 PM »
Quote from: "i-techzone"

i meant when i restart the server the squid configuration change to default.


But you haven't said why you want to restart the server, or what part of the configuration you want to change, or why.

Quote

 .. because i just found how to improve the squid performance and i can't save it to this system ...


What secret have you found to improve squid performance?

To make the change you want, and have it stick, you can do:

TC=/etc/e-smith/templates-custom
mkdir -p $TC/etc/squid.squid.conf
cp /etc/squid/squid.conf $TC/etc/squid
pico $TC/etc/squid/squid.conf
/sbin/e-smith/expand-template /etc/squid/squid.conf

Note, however, that once you make this change, any other automated updates of squid.conf (e.g. if you change your system domain name) will be blocked. To get back to "normal" behaviour, just remove the custom template.

i-techzone

Squid Problem ... to optimize Squid Server
« Reply #6 on: April 12, 2005, 05:55:11 AM »
Hai all ...

I'm very sorry .. i don't mean to keep the secret. Actually this only the first step i made to make my server performance well.

A few days ago (until today), in Malaysia we had a problem with our internet broadband performance. So i change my server to act as transparency proxy server and it give good response. then i search in the net how to make more perfect to this squid. Then i found this url.

http://www.linux-faqs.com/squid.php

i have try it a few coding ... and it work to my lovely SME Server.

But with my little knowledge of SME Server (even i go through this forum - i didn't find solution) i just can restart squid service.

I think, if somebody here can translate the normal linux coding to SME coding all SME user/admin would be happy with the SME Server.

and if somebody can help me to exlpain how to make a full throttle to local network .. because i need to give full performance to my localnetwork all the time

Thank you.

:-D


P/S: Sorry coz ask to many question. I didn't find a or any solution reegarding squid in this forum ...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Squid Problem ... to optimize Squid Server
« Reply #7 on: April 12, 2005, 03:45:13 PM »
Quote from: "i-techzone"

A few days ago (until today), in Malaysia we had a problem with our internet broadband performance. So i change my server to act as transparency proxy server and it give good response.


That doesn't make sense, since it was already acting as a transparent proxy server.

Quote

 then i search in the net how to make more perfect to this squid. Then i found this url.

http://www.linux-faqs.com/squid.php

i have try it a few coding ... and it work to my lovely SME Server.


So what did you change to make it work better?

i-techzone

Squid ... problem ...
« Reply #8 on: April 12, 2005, 04:49:48 PM »
Erm ...

Mr. CharlieBrady,

what should i paste and wrote here ... when i already give the url ...

for your information ... i use server-only mode ... so may be u think it possible to make transparenxy proxy ... i meant i not setup my internet explorer to point to my server ....

i still use my router as internet gateway but this server build just only for handle my dns and squid. the problem is, when i switch off my server my internet not do well ... then when i switch on back my server my internet goes better ... then when i put the coding in http://www.linux-faqs.com/squid.php the internet internet perform very well ...

i hope u under stood ... and remember i do just  only the coding in that url ... not hardware bcos my hardware more enough that what it state. or ... can u tell me how to make full trottle to my internet squid ?

Please please please help me ... hope so ...

Black

squid problem ...
« Reply #9 on: April 12, 2005, 05:46:55 PM »
This post is completly confusing.  :-?

DarkMirage

squid problem ...
« Reply #10 on: April 12, 2005, 07:14:43 PM »
Quote
But with my little knowledge of SME Server (even i go through this forum - i didn't find solution) i just can restart squid service

Well there are certain ways you are supposed to do this, however... a quick and dirty test is achieved with "service squid restart"

Quote
what should i paste and wrote here ... when i already give the url

Seems like a whole lot of text to me  :hammer:

Why not tell us:
Which lines (the exact text) you want to remove.
Which lines (the exact text) you want to add.

Then, we might be able to tell you where to remove and add those lines.

Your network setup, to me, sound strange at the least.
If your workstation-to-gateway connection improves by using a server not in that connection, your workstation or gateway configuration is bad.
You say you use sme for dns, which implies you setup your workstation to use sme's dns service.
Do you change this when testing without the sme server?
Waiting for the primary dns server to timeout would be bad for performance me thinks  :lol:

i-techzone

this .. command line ....
« Reply #11 on: April 12, 2005, 08:21:08 PM »
Your right ... before this i just use redhat linux 9.0 with bind to handle my dns service. it look pretty well .. but with this sme server tinydns .. it look little bit slow ... (sometimes). i change to SME server becoz i don't have enough time (and have little knowledge about linux) to setup/setting apache,mail server, and samba using command line and edit all those from scratch.

so this a some command i need to add ...

Save this value in squid.conf
------------------------------
http_port 80 3128
httpd_accel_port 81

cache_dir 2048 14 256
cache_store_log none
half_closed_clients off
maximum_object_size 1024 KB
------------------------------

run this command in shell ..
ulimit -HSn 8192 echo 1024 32768 > /proc/sys/net/ipv4/ip_local_port_range

DarkMirage

squid problem ...
« Reply #12 on: April 12, 2005, 09:45:53 PM »
Let me say first, I'm not an expert, I just picked up some things while hanging around here...
I don't know what these commands do, just how to enter them. So be sure you want to do this.

To enter the mentioned lines and commands, and restart services enter the following commands:

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf
echo 'http_port 80 3128' > \
/etc/e-smith/templates-custom/etc/squid/squid.conf/41http_port
echo 'httpd_accel_port 81' > \
/etc/e-smith/templates-custom/etc/squid/squid.conf/51http_accel_port
echo 'cache_dir 2048 14 256' > \
/etc/e-smith/templates-custom/etc/squid/squid.conf/31cache_dir
echo 'cache_store_log none' > \
/etc/e-smith/templates-custom/etc/squid/squid.conf/32cache_store_log
echo 'half_closed_clients off' > \
/etc/e-smith/templates-custom/etc/squid/squid.conf/90misc
echo 'maximum_object_size 1024 KB' >> \
/etc/e-smith/templates-custom/etc/squid/squid.conf/90misc
/sbin/e-smith/expand-template /etc/squid/squid.conf
/etc/e-smith/events/actions/proxy-restart
ulimit -HSn 8192
echo '1024 32768' > /proc/sys/net/ipv4/ip_local_port_range
cd '/etc/e-smith/events/actions'
./LPRng-restart; ./proxy-restart; ./reload-samba; ./reload-xinetd; ./restart-httpd-graceful


To remove the squid configuration changes enter the following:
Code: [Select]
rm -rf /etc/e-smith/templates-custom/etc/squid/squid.conf
/sbin/e-smith/expand-template /etc/squid/squid.conf


Also trigger those events (last line) again.

Offline Brave Dave

  • *
  • 185
  • +0/-0
squid problem ...
« Reply #13 on: April 13, 2005, 11:00:35 AM »
sheese - talk about documentation for the ones who can't be bothered reading the documentation
.:DB:.

i-techzone

squid ... thanks ...
« Reply #14 on: April 13, 2005, 12:40:05 PM »
thanks DarkMirage ... i will try my best to edit another command based on your examples ...


sorry davidbray ... i already read and go through .. but i still don't understand the concept of sme and never find the solution about squid. maybe you will ask me that i may not posible to change httpd port .. but i successful change it after reading the post in this forum even the examples have an error to my box ..

anyway thanx a lot guys ...

 :-D