RedHatLinux9 installation configuration Squid

Source: Internet
Author: User
Software environment: RedHatLinux9 on the Squid homepage www.squid-cache.org download the latest Squid2.5-STABLE5 for compilation. Step: 1.download the latest source file squid-2.5.stable5.src.tar.gz placed in the/usr/local directory 2. Log On As root and execute the following command: cd/usr/localtar-zxvfSquid-2.5.STABLE

Software environment: RedHat Linux 9
On the Squid home page www.squid-cache.org download the latest Squid 2.5-STABLE5 for compilation.

Steps:
1. download the latest version of the source file Squid-2.5.STABLE5.src.tar.gz placed in the/usr/local directory

2. Log On As the root user and run the following command:
Cd/usr/local
Tar-zxvf Squid-2.5.STABLE5.src.tar.gz
Generate extract file Squid-2.5.STABLE5
Go to the Squid-2.5.STABLE5 directory for compilation
# Cd/usr/local/squid *
#./Configure -- prefix =/usr/local/squid
# Make
# Make install

3. After the above two steps are completed, the entire Squid program should be installed in the/usr/local/squid directory, but other actions are still required.

4. Enter the directory/usr/local, run the following command as root, and change the owner of the entire Squid directory to school: school.
# Cd/usr/local
# Chown-R school: school squid

5. modify the configuration information of squid. conf.
# Su school
$ Cd/usr/local/squid
$ Vi etc/squid. conf
Http_port 8080
Cache_peer 10.10.2.53 parent 6666 7 login = username: password default no-query
Cache_mem 60 MB
Cache_mgr zdysgs@zju.edu.cn
Dns_nameservers 10.10.0.21
Visible_hostname zdysgs.zju.edu.cn
Cache_dir ufs/usr/local/squid/var/cache 500 16 256
Http_access allow all
Never_direct allow all
Error_directory/usr/local/squid/share/errors/Simplify_Chinese
Cache_swap_low 80
Cache_swap_high 97 is the threshold value for cache replacement. When 97% of the cache is occupied, the content in the cache is cleared by 20%.

6. Run su as the school and enter the/usr/local/squid/bin directory. Run # squid-z to create the cache swap directory.
# Su school
$ Cd/usr/local/squid/sbin
$./Squid-z
$./Squid
Command to check whether squid is running normally
$ Netstat-ntl
Tcp 0 0 0.0.0.0: 8080 0.0.0.0: * LISTEN
The above information indicates that squid has started properly.
Command to stop squid running:
$ Usr/local/squid/sbin-k shutdown
So far, this proxy server can be used normally, but does not have the user authentication function. The following describes how to use the ncsa user authentication function.

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.