Install the Squid agent in Linux under the detailed configuration tutorial _ server Other

Source: Internet
Author: User
Tags auth versions
1. If the system has not been installed squid, in the following order to enter the command to complete the installation
# wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE18.tar.gz//Download Squid agent installation package
# TAR-ZXVF squid-3.0.stable18.tar.gz//Extract Squid installation package
# CD Squid-3.0.stable18
#./configure--prefix=/usr/local/squid--sysconfdir=/usr/local/squid/etc--bindir=/usr/local/squid/bin--sbindir=/ Usr/local/squid/sbin--mandir=/usr/local/squid/share/man--enable-gnuregex--enable-carp--enable-async-io=80-- Enable-removal-policies=heap,lru--enable-icmp--enable-delay-pools--enable-useragent-log--enable-referer-log-- Enable-kill-parent-hack--enable-snmp--enable-arp-acl--enable-htcp--enable-cache-digests-- Enable-default-err-language=simplify_chinese--enable-err-languages= "Simplify_chinese"--enable-poll-- Enable-linux-netfilter--disable-ident-lookups--enable-underscores--enable-auth= "Basic"-- enable-basic-auth-helpers= "NCSA"--enable-external-acl-helpers= "Ip_user"--enable-x-accelerator-vary// Configure Squid agent installation path and so on
# Make//Compile
# make install//install squid agent software

----------------------------------

2. After the installation of the configuration file in the/usr/local/squid/etc directory, delete the original squid.conf configuration file, new squid.conf file, only enter the following:
Http_port Transparent
Http_access Allow all

Note that the above is squid2.6 and later versions of the configuration, if it is 2.6 previous versions of Squid, configured as follows:
Http_port 80
Httpd_accel_host Virtual
Httpd_accel_port 80
Httpd_accel_with_proxy on
Httpd_accel_uses_host_header on

----------------------------------

3./usr/local/squid/sbin directory under the squid for running files.
The first time you run, run squid-z to create the cache folder. The cache folder is created under/usr/local/squid/var, so you need to run chmod 777/usr/local/squid/var to the folder before you create the cache.
Then run squid-d 1 to open squid.
If you want to turn off squid, running squid-k shutdown is safe shutdown.
Note that if the newly installed squid is not configured as an environment variable, try to run it in the Sbin directory./squid to avoid running the old squid already on the server.

----------------------------------

4. Set up a DNS server to point all domain name resolution to the IP of the server that needs to be proxied, such as using Bind,winmydns software. Set the DNS of the server on which squid is located as the DNS server.

5. All domain names of the server will be resolved to squid on the server, then the server can be used as a relay.

----------------------------------

Possible problems:
Squid sometimes has an error when running:
CLIENTNATLOOKUP:NF getsockopt (SO_ORIGINAL_DST) failed: (MB) Protocol not available
But it does not seem to affect access

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.