Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get the right Squid version

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to get the right Squid version. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Squid developers release source code on a regular basis. Each release has a version number, such as 2.5.STABLE4. The third part of the version number begins with STABLE or DEVEL (short-term development version).

As you can guess, the DEVEL version tends to have newer, more experimental features. But maybe they have more bugs. Inexperienced users should not run the DEVEL version. If you choose to run a version of DEVEL and encounter a problem, please report the problem to the Squid maintainer.

After a period of development, the Squid version number becomes STABLE. This version is suitable for ordinary users. Of course, even the stable version may have some bugs. Higher stable versions (such as STABLE3,STABLE4) should have less bugs. If you are particularly concerned about stability, you should use one of these recent releases.

Use the source code

Why can't you copy a precompiled binary into your system and expect it to work well? The main reason is that squid code needs to know the parameters of a particular operating system. In fact, the most important parameter is the number of open file descriptors. Squid's. / configure script detects these values before compilation. If you get a compiled squid that uses one parameter value to another system that uses different parameter values, you may encounter problems.

Another reason is that many squid functions must be activated at compile time. If you get a squid file that someone else has compiled, and it doesn't contain the functionality you need, you have to compile it again.

* problems with shared libraries may make it difficult to share executables between systems. Shared libraries are loaded at run time, just like known dynamic links. At compile time, squid will detect certain functions of the C libraries in your system (such as whether they are provided, whether they can be run, etc.). Although library functionality does not change often, there may be significant differences between the C libraries of two different systems. If the two systems are too different, it will cause problems for Squid.

It is very easy to get the source code for squid. Visit the home page of squid: http://www.squid-cache.org. There are links to different stable and development versions on the home page. If you are not in the United States, please visit one of squid's many mirror sites. Mirror sites are usually named after "wwwN.CC.squid-cache.org", N is a number, and CC is a two-digit code for the country. For example, www1.au.squid-cache.org is a mirror site in Australia, with links to different mirror sites on the home page.

Each squid distribution branch (such as Squid-2.5) has its own HTML page. This page has links to the source code, as well as differences from other releases. If you upgrade from one release to the next, you should download these differential files and patch them, as described in Section 3.7. The release page for each release describes new features and important improvements, with links to bugs that have been revised.

If web access is not feasible, you can get the source code from ftp://ftp.squid-cache.org 's FTP server, or use other FTP images. To get the current version, visit the pub/squid-2/DEVEL or pub/squid-2/STABLE directory. FTP images are also available in many countries, and you can use the same country code to guess some FTP mirror sites, such as ftp1.uk.squid-cache.org.

The current Squid release is about 1m in size. After downloading the compressed package file, you can continue to Chapter 3.

Precompiled binaries

Some Unix distributions may pre-include a compiled version of Squid. For Linux systems, you can find Squid's RPM package. Usually squid RPM is included in the Linux disc you buy. Freebsd/Netbsd/OpenBSD also includes squid in their ports or packages.

Although RPM or precompiled packages can save you some time, they also have some disadvantages. As I mentioned, some features must be activated or disabled before you can start compiling squid. The precompiled package you install may not contain the specific features you want. Also, squid's. / configure script detects specific parameters in your system, which may be different from those of the machine on which it was compiled.

* if you want to patch squid, you have to wait for someone to compile the updated RPM or packages, or you have to find your own source code to compile.

I strongly recommend that you compile squid from the source code, and of course it's up to you to choose.

Anonymous CVS

You can anonymously access squid's CVS file (read-only) to keep your source code up-to-date. The advantage of using CVS is that you can easily get patches for the current running version. This makes it easy to see what has changed recently.

Put these patches into the version you are running to effectively keep your source code in sync with the official version.

CVS uses a tree indexing system, and the trunk is called the head branch. For Squid, this is also the place where all the new changes and features are stored. The header branch usually contains experimental and perhaps unstable code. Stable code is usually on other branches.

In order to effectively use squid's anonymous CVS, you should first know how versions and branches are marked differently. For example, the version 2.5 branch is named SQUID_2_5. Specific releases have long names, such as SQUID_2_5_STABLE4. To get the squid version of 2.5.STABLE4, use the SQUID_2_5_STABLE4 tag; use SQUID_2_5 to get the code for the most recent 2.5 branches.

To use the squid anonymous CVS service, you must first set the CVSROOT environment variable:

Csh% setenv CVSROOT: pserver:anoncvs@cvs.squid-cache.org:/squid

Or, for Bourne shell users:

Sh$ CVSROOT=:pserver:anoncvs@cvs.squid-cache.org:/squid sh$ export CVSROOT

Then you can log in to the server:

% cvs login (Logging in to anoncvs@cvs.squid-cache.org) CVS password:

At the prompt, type anoncvs as the password. Now you can check the source tree with this command:

% cvs checkout-r SQUID_2_5-d squid-2.5 squid

The-r option specifies to get the revision tag. Omit the-r option and you will get the head branch. The-d option changes the name of the * directory in which the file is stored. If you omit the-d option, the * directory name is the same as the module name. The command line argument (squid) of * * is the name of the module to be checked.

Once you have checked the squid source tree, you can run the cvs update command to upgrade your files and keep them synchronized. Other commands include: cvs diff, cvs log, and cvs annotate.

Devel.squid-cache.org

Squid developers maintain a separate site that currently runs on SourceForge and provides experimental squid functionality. Please check them in http://devel.squid-cache.org. Here you can find many projects under development that have not yet been integrated into the official source code of squid. You can access these projects through SourceForge's anonymous CVS service, or download different files from the standard version.

This is the end of the article on "how to get the right Squid version". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report