Hi,
I’m looking to upgrade squid 3.0.x to the latest version 3.1.x.
Is there a way of doing it without losing the current configuration ?
The installed version was done using the binary package (rpm) and not compiled from a tar package.
Thanks.
Hi,
I’m looking to upgrade squid 3.0.x to the latest version 3.1.x.
Is there a way of doing it without losing the current configuration ?
The installed version was done using the binary package (rpm) and not compiled from a tar package.
Thanks.
I don’t know, but I think I know what your best chance would be.
First, whatever you do, back-up your existing squid.conf. I don’t know whether the existing squid.conf is completely compatible with a 3.1 series squid…it probably is (and ‘compatible’ includes ‘working, but leaves some features at their default values’, which I’d hope wouldn’t be dangerous, but you never know, without checking line-by-line.)
Secondly, the only repo I can see with a sufficiently up-to-date squid (on 11.3…you may well be on something more recent…or even something older) for you is Index of /repositories/server:/proxy/openSUSE_11.3
which has 3.1.12-36. There are a number of other repos with a squid, but that is the only one that I can see that meets the 3.1.x requirement.
Having enabled that repo, then switch your squid 3 to the new repo. Now you have a choice:
I think you should take option 1 (compare (eg, diff) and edit the new .conf to include the stuff from the old one), but I think you’ll take option 2.
I have done this. The 3.1 RPM will not overwrite the old squid.conf but rename the squid.conf from the package as squid.conf.rpmnew. You should then do a diff of squid.conf and squid.conf.rpmnew to see what additional directives there are. Or in my case, I transferred the custom settings to the newer squid.conf.
Make a backup of squid.conf just in case anyway.
Thanks guys.
ken_yap, can you share with us how did you do that ?
I have Opensuse 11.2 running Squid 3.0.x and I downloaded the latest rpm.
Did you just run the command “rpm -U squid-3.1.x.rpm” ?
Did you run that on a live environment ? Were there any downtime.
Can you please give some details ?
Thanks.
I just made a backup of squid.conf just in case, did a rpm -Uhv squid-3.1-blah-blah.rpm and it installed the new squid.conf as squid.conf.rpmnew.
I then compared this with my current squid.conf and copied my customisations over and renamed it as the working squid.conf.
Naturally you should shutdown squid to avoid issues with running old binaries, etc. So there will be downtime. Since I’m using it mostly as an adblock for myself, it didn’t matter. For a production environment you should announce some downtime.
ken_yap,
Thanks for your quick reply.
Will go ahead and try this and post my feedback here.
Cheers.
Hello ken_yap,
The upgrade went fine… and squid 3.1.11 was installed…Needed to upgrade some of the dependencies though.
but I noticed that the squid.conf.rpmnew created was not complete. It contains only the minimum recommended configuration as follows:
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#http_access deny to_localhost
http_access allow localnet
http_access allow localhost
http_access allow localhost
http_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
#cache_dir ufs /var/cache/squid 100 16 256
coredump_dir /var/cache/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern . 0 20% 4320
Any ideas ??
I need the new squid.conf !
I was thinking about preparing a new machine with Opensuse 11.4 and then install squid 3.1.11 on that machine and copy the new squid.conf to my current producation environment after I make the necessary settings on that file of course…
But this is the hard way.
Any advices ?
Thanks.
If you look in /etc/squid/ there is another file squid.conf.documented which contains all the possible settings.
You’re right, haven’t paid attention to that file…
Will copy it into a new file, make my settings and then rename it to squid.conf, which I presume is the right procedure.
Many thanks for your help.