{"id":919,"date":"2011-04-23T17:38:48","date_gmt":"2011-04-23T09:38:48","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=919"},"modified":"2023-07-04T15:48:57","modified_gmt":"2023-07-04T15:48:57","slug":"how-to-install-and-configure-squid-proxy-server-in-centos-5-5","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-squid-proxy-server-in-centos-5-5\/","title":{"rendered":"How to Install and Configure Squid Proxy Server in CentOS 5.5"},"content":{"rendered":"<p>As a server webmaster, you may often find yourself in a situation where you need to improve the performance of your web browsing experience.<\/p>\n<p>One effective solution to this problem is the use of a proxy server, specifically, the Squid proxy server. Squid is a caching proxy server that improves response times and reduces bandwidth usage by caching and reusing frequently-requested web pages.<\/p>\n<p>This tutorial will guide you on how to install and configure a Squid proxy server on CentOS 5.5. The benefits of using Squid include faster browsing speeds and improved overall network performance.<\/p>\n<p>For more information on proxy servers, you can visit our <a href=\"https:\/\/webhostinggeeks.com\/best\/proxy-servers\/\">Best Proxy Servers List<\/a>. For a deeper understanding of Squid&#8217;s features, functions, and benefits, check out this <a href=\"https:\/\/webhostinggeeks.com\/blog\/squid-proxy-server-features-functions-benefits\/\">article<\/a>.<\/p>\n<h2>Step 1: Install Squid<\/h2>\n<p>The first step is to install Squid on your CentOS 5.5 server. This can be done using the yum package manager with the command &#8220;yum -y install squid&#8221;.<\/p>\n<p>For example:<\/p>\n<pre>\r\n[root@server ~]# yum -y install squid\r\nLoaded plugins: fastestmirror\r\nLoading mirror speeds from cached hostfile\r\n * addons: centos.ipserverone.com\r\n * base: centos.ipserverone.com\r\n * epel: mirror01.idc.hinet.net\r\n * extras: centos.ipserverone.com\r\n * updates: centos.ipserverone.com\r\nSetting up Install Process\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package squid.i386 7:2.6.STABLE21-6.el5 set to be updated\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n=====================================================================================\r\n Package         Arch           Version                         Repository      Size\r\n=====================================================================================\r\nInstalling:\r\n squid           i386           7:2.6.STABLE21-6.el5            base           1.3 M\r\n\r\nTransaction Summary\r\n=====================================================================================\r\nInstall       1 Package(s)\r\nUpgrade       0 Package(s)\r\n\r\nTotal download size: 1.3 M\r\nDownloading Packages:\r\nsquid-2.6.STABLE21-6.el5.i386.rpm                             | 1.3 MB     00:24\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nFinished Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing     : squid                                                         1\/1\r\n\r\nInstalled:\r\n  squid.i386 7:2.6.STABLE21-6.el5\r\n\r\nComplete!\r\n<\/pre>\n<h2>Step 2: Configure Squid<\/h2>\n<p>Once Squid is installed, you need to configure it. The main configuration file for Squid is located at \/etc\/squid\/squid.conf. You can edit this file using the vi text editor with the command vi \/etc\/squid\/squid.conf.<\/p>\n<h2>Step 3: Set the Port<\/h2>\n<p>By default, Squid uses TCP port 3128. However, you can change this to any port you prefer. For example, you can change it to port 8080 by modifying the line http_port 8080 in the configuration file.<\/p>\n<h2>Step 4: Allow Internal IP Networks<\/h2>\n<p>You need to specify the internal IP networks from which browsing should be allowed. This can be done by adding the following lines to the configuration file:<\/p>\n<pre>\r\nacl intranet_local src 192.168.2.0\/24\r\nhttp_access allow intranet_local\r\n<\/pre>\n<h2>Step 5: Start Squid<\/h2>\n<p>Once you have configured Squid, you need to start it. You can also configure it to start automatically at boot. This can be done using the following commands:<\/p>\n<pre>\r\nchkconfig squid on\r\n\/etc\/init.d\/squid start\r\n<\/pre>\n<h2>Step 6: Configure Your Client Browser<\/h2>\n<p>The final step is to configure your client browser to use the Squid proxy server. You need to set the proxy server IP address and port (8080 in this example) in your browser&#8217;s network settings.<\/p>\n<h2>Step 7: Test Your Setup<\/h2>\n<p>You can test your setup by browsing the web from your client machine. If everything is configured correctly, you should notice an improvement in browsing speed.<\/p>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">yum -y install squid<\/span> \u2013 Installs Squid on your server.<\/li>\n<li><span class=\"fw-bold\">vi \/etc\/squid\/squid.conf<\/span> \u2013 Opens the Squid configuration file for editing.<\/li>\n<li><span class=\"fw-bold\">chkconfig squid on<\/span> \u2013 Configures Squid to start automatically at boot.<\/li>\n<li><span class=\"fw-bold\">\/etc\/init.d\/squid start<\/span> \u2013 Starts the Squid service.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>In this tutorial, we have walked through the process of installing and configuring a Squid proxy server on CentOS 5.5. We have seen how Squid can improve web browsing speed and overall network performance by caching and reusing frequently-requested web pages. By following these steps, you can set up your own Squid proxy server and enjoy the benefits it offers.<\/p>\n<p>For more information on different types of hosting, you can visit these links: <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-dedicated-server-hosting\/\">Dedicated Server Hosting<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-vps-hosting\/\">VPS Hosting<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-cloud-hosting\/\">Cloud Hosting<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-shared-hosting\/\">Shared Hosting<\/a>.<\/p>\n<p>I hope this tutorial has been helpful. If you have any questions or comments, please feel free to leave them below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a server webmaster, you may often find yourself in a situation where you need to improve the performance of your web browsing experience. One effective solution to this problem&#8230;<\/p>\n","protected":false},"author":6,"featured_media":349,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1057],"tags":[1246,1536,1678],"class_list":["post-919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-squid-server","tag-centos-5-5","tag-linux","tag-proxy"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=919"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/919\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/349"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}