How To Install squid on CentOS 7

In this tutorial we learn how to install squid on CentOS 7. squid is The Squid proxy caching server

Introduction

In this tutorial we learn how to install squid on CentOS 7.

What is squid

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.

We can use yum or dnf to install squid on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install squid.

Install squid on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install squid using yum by running the following command:

sudo yum -y install squid

Install squid on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install squid using dnf by running the following command:

sudo dnf -y install squid

How To Uninstall squid on CentOS 7

To uninstall only the squid package we can use the following command:

sudo dnf remove squid

References

Summary

In this tutorial we learn how to install squid on CentOS 7 using yum and dnf.