How to install and configure Squid proxy server on CentOS 7
To Install and Configure Squid proxy server on Cent OS 7
Introduction
Squid Proxy server which is the widely used in unix like platforms. It is mainly used for to reduce the traffic and lower the bandwidth from server to client. A squid server which stores the mostly requesting data from the client and stores that data in the form of cache. Squid can also be used for security purpose.
Installing the squid service
[root@linuxhelp /]# yum install squid -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package squid.x86_64 7:3.5.20-17.el7_9.6 will be installed
--> Processing Dependency: squid-migration-script for package: 7:squid-3.5.20-17.el7_9.6.x86_64
--> Running transaction check
---> Package squid-migration-script.x86_64 7:3.5.20-17.el7_9.6 will be installed
--> Finished Dependency Resolution
Installed:
squid.x86_64 7:3.5.20-17.el7_9.6
Dependency Installed:
squid-migration-script.x86_64 7:3.5.20-17.el7_9.6
Complete!
Editing the configuration file
[root@linuxhelp /]# vim /etc/squid/squid.conf
Creating the block list
[root@linuxhelp /]# vim blocklist.txt
Again Editing the configuration file
[root@linuxhelp /]# vim /etc/squid/squid.conf
To see the status of the squid service
[root@linuxhelp /]# systemctl status squid
● squid.service - Squid caching proxy
Loaded: loaded (/usr/lib/systemd/system/squid.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Sep 03 06:56:19 linuxhelp.localdomain squid[9630]: Squid Parent: will star...
Sep 03 06:56:19 linuxhelp.localdomain squid[9630]: Squid Parent: (squid-1)...
To start the squid squid service
[root@linuxhelp /]# systemctl start squid
To Enable the squid service to start on boot
[root@linuxhelp /]# systemctl enable squid
Created symlink from /etc/systemd/system/multi-user.target.wants/squid.service to /usr/lib/systemd/system/squid.service.
Again see the status of the squid service
[root@linuxhelp /]# systemctl status squid
● squid.service - Squid caching proxy
Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-09-03 07:06:33 EDT; 22s ago
Main PID: 9992 (squid)
CGroup: /system.slice/squid.service
├─9992 /usr/sbin/squid -f /etc/squid/squid.conf
├─9995 (squid-1) -f /etc/squid/squid.conf
└─9999 (logfile-daemon) /var/log/squid/access.log
Checking the non blocked sites
!
Checking the blocklist site
With this installation on squid proxy server on centos 7 comes to end
Comments ( 0 )
No comments available