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