Simple installation and maintenance process of squid (Forward proxy, Internet sharing)

Source: Internet
Author: User

 

L The inux agent software squid can implement forward and reverse proxy. We use the forward proxy function to achieve multi-person Internet access and reverse proxy to improve the web response capability.
The maintenance of reverse proxy is much more complicated. This article only introduces the forward proxy, because many people share the Internet through Linux Hosts.

Simple installation and maintenance process: 1. Install squid # Yum install squid 2. Enable the kernel routing function # Echo "1">/proc/sys/NET/IPv4/ip_forward 3. Edit the configuration file/etc/squid. conf. Http_port 3128// Proxy server port Cache_mem 100 MB
// Memory cache size, noYesMore than half of the physical memory Cache_dir ufs/var/spool/squid 100 16 256 // Set the hard disk buffer size. The first numeric parameter cannot be smaller than the cache_mem value. Otherwise, the warning "Warning cache_mem is larger than total disk cache space!" is displayed !", So it is set to 100. 16,256 indicates the level 1 and level 2 directories. Required after setting
Squid-Z to make the cache directory take effect. Http_access allow all  // Allow access by all users. It can be configured as a complex control mode. Visible_hostname Test
// Set visible_hostname. Otherwise, the following error occurs: "Fatal: cocould not determine fully qualified hostname." Please set 'visible _ hostname' 4. Check and initialize squid Check the syntax of the squid. conf file. # Squid-K parse
Initialize squid # Squid-z

5. Start the service# Service squid start
Starting squid:. [OK] 6. Configure the service to be automatically started
# Chkconfig -- level 345 squid on

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.