Squid-2.7.STABLE9 installation configuration under RHEL4

Source: Internet
Author: User
1, do not use rpm package 2, from the Squid site www.squid-cache.org to obtain the software source code installation package 3, install the configure command. /configure -- sysconfdir =/etc/squid -- enable-arp-acl -- enable-linux-netfilter -- with-pthreads -- enable-storeio = ufs, nul

1. Do not use rpm packages

2. Get the source code installation package for the software from the Squid site www.squid-cache.org

3. Install the configure command

. /Configure -- sysconfdir =/etc/squid -- enable-arp-acl -- enable-linux-netfilter -- with-pthreads -- enable-storeio = ufs, null -- enable-auth = "basic" -- enable-basic-auth-helpers = "LDAP, NCSA"

Some options are described as follows:

-- Prefix =/usr/share/squid
# Specify the installation location of Squid. By default, the/usr/local/squid/directory contains bin, sbin, man, conf, and other directories if only this option is specified, the main configuration file is in the conf subdirectory. To facilitate management, it is best to use the -- sysconfdir =/etc parameter to set the file location to/etc.
-- Enable-storeio = ufs, null
# The file system used is usually the default ufs, but if you want to create a proxy server that does not cache any files, you need to add a null file system.
-- Enable-arp-acl
# In this way, you can manage the MAC address of the client directly in Rule settings to prevent IP spoofing.
-- Enable-err-extensions ages = "Simplify_Chinese"
-- Enable-default-err-ages = "Simplify_Chinese"
# The above two options tell Squid to compile and use the simplified Chinese error message.
-- Enable-linux-netfilter
# Linux transparent proxy is allowed.

-- Enable-auth = "basic" -- enable-basic-auth-helpers = "LDAP, NCSA"

# Allow user name/Password Authentication

4. Configure/etc/squid. conf.

1) set the user running squid (permissions may occur if squid is not set)

Cache_inclutive_user squid


2) Add the ncsa user name/password authentication:

Auth_param basic program/usr/local/squid/libexec/ncsa_auth/usr/local/squid/etc/passwd

Make sure that the/usr/local/squid/etc/passwd file exists (created with the htpasswd-c/usr/local/squid/etc/passwd username)

3) set the cache directory, which the squid user must have the permission

Cache_dir ufs/var/spool/squid 100 16 256

4) set the acl list

Acl passwd proxy_auth REQUIRED

5) set Access Permissions

Http_access allow passwd
Http_access deny all

5. Run squid

#/Usr/local/squid2.7/sbin/squid-z
#/Usr/local/squid2.7/sbin/squid-NCd1 --------> You can directly observe the service.
#/Usr/local/squid2.7/sbin/squid-sD --------> start the service
/Usr/local/squid2.7/bin/squidclient-p 80 mgr: mem
/Usr/local/squid2.7/bin/squidclient-p 80 mgr: info

6. Add the squid to the system startup Item.
Edit/etc/rc. d/rc. local and add the following lines:/usr/local/squid/sbin/squid-s.

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.