Squid is a web proxy caching server that offers proxy and caching services for HTTP, HTTPS, FTP, and some other protocols.
A proxy caching server works by acting as a gateway between server and client machines and stores frequently used content locally. By storing content locally, it reduces bandwidth while speeds up content delivery and response time.
Squid is licensed under the GNU GPL and is supported on all major operating systems platforms including Linux OS.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to install the Squid proxy server on the Linux system.
In this context, we shall look into the steps to get Squid proxy installed on Ubuntu.
A few reasons for which you might want to deploy the Squid proxy server on your network can be:
i. To reduce webpage load time.
ii. To implement network access policies.
iii. To hide user's machine for anonymous surfing.
iv. To scan outbound content.
v. Dispense load among multiple web servers to cut-down load on a single server.
Squid is available in the official repositories of Ubuntu distribution. Hence, you can simply install it via the apt package manager.
Below are the steps to install the Squid proxy server on Linux.
1. Update Apt of the Ubuntu Server
First, update apt using the below command in Terminal:
$ sudo apt update
2. Install the Squid proxy server
Now in order to install Squid, execute the below command in Terminal:
$ sudo apt install squid
If prompted for confirmation, press y, after which the system will begin the installation of the Squid proxy server on your system. Based on your internet connection speed, the installation of Squid may take some time.
3. Verify installation of Squid proxy server
Once the installation of the Squid proxy server is completed, you can verify it using the below command in Terminal:
$ squid --version
This command will display the version of Squid proxy server installed.
Once the Squid proxy server installation is completed, its service starts automatically. If it does not start automatically, you can manually start it with the following command:
$ sudo systemctl start squid
To stop Squid proxy server service, use the following command:
$ sudo systemctl stop squid
To enable the Squid proxy server at boot, use the following command:
$ sudo systemctl enable squid
This will enable the Squid proxy server. Now the service will automatically start at each boot.
You can also check the status of the Squid proxy server using the below command:
$ sudo systemctl status squid
You will see that the Squid proxy server is active and running.
If you do not need Squid proxy server anymore on your system, you can easily uninstall it using the below command:
$ sudo apt remove squid
This article will guide you on steps to #install the Squid proxy server on your #Linux machine. You will also learn how to uninstall the Squid #proxy server in the #Ubuntu #machine and manage Squid services.
Squid is a caching proxy for the Web supporting HTTP, #HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages.
It is most often used in conjunction with a traditional LAMP stack (Linux, Apache, MySQL, PHP), and can be used to filter traffic on #HTTP, FTP, and HTTPS, and increase the speed (thus lower the response time) for a web server via caching.
To clear #squid proxy cache:
1. Stop the #httpd and squid services.
2. Delete the contents of the cache as follows: # rm -Rf /var/cache/rhn/*
3. Restart the squid and httpd services.