Install Squid 2.7.Stable9 On CentOS 6.8

0
802
(Last Updated On: 5 January 2016)

Squid server is a popular open source GPLd proxy and web cache. It has a variety of uses, from speeding up a web server by caching repeated requests, to caching web, name server query , and other network lookups for a group of people sharing network resources. It is primarily designed to run on Linux / Unix-like systems. Squid is a high-performance proxy caching server for Web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process. Squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests. Squid consists of a main server program squid, a Domain Name System lookup program (dnsserver), a program for retrieving FTP data (ftpget), and some management and client tools.

In this guide we will be focusing on source code installation and then perform basic configuration on it.

Source Code Installation Benefits

There are many advantages of compiling Squid Proxy manually from the source as compare to pre-compiled binary packages. We can compile squid with custom flags, depending on our network requirements. During compilation process we can enable or disable extra features, which is not possible while we are installing Squid using pre-compiles binary package.

 

Installing Squid Proxy From Source Code.

Step-1: Install Required Tools & Packages

Before we download and compile Squid we need to install some required packages.

Install GCC (C and C++ Compiler) and Development Tools

Install unzip and opensll-devel

Step-2: Downloading Squid Source Archive

Change Directory to tmp.

Obtain Source code of squid proxy from official website link:

Uncompromising the source archive:

Step-3: Compiling Squid Proxy

Navigate to squid directory where squid extracted.

If you want to know more about squid configuration options you can run ./configure –help | less command.

This will display the page containing the options and their brief description for configure. Use up and down arrow keys to navigate through the information.

Let’s compile Squid with some extra features.

We will enable squid bandwidth control feature, transparent proxy support, enable authentication and filter client request based on mac address, for that will use following command:

Now run make command

Finally place files in proper locations using make install command:

So far everything went well so we have successfully complied squid proxy server using source code.

Step-4: Basic Configuration

Now we will perform some basic configuration and start the service to make squid proxy server in action.

Default Squid installed directory is /etc/squid/

To Edit configuration file open squid.conf in vi text editor.

 

Download simple config

 

Source:

  1. squid-cache.org
  2. linode.com
  3. digitalocean.com

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.