Instructions for using HTTP acceleration software

Source: Internet
Author: User
Tags disk usage

HTTPAccelerated software usage Instructions

HTTP acceleration software is used in satellite links to increase HTTP transmission rates in the case of satellite chain Luchiengo

1.1PackageDepend on

(1) squid-3.4.5.tar.gz

(2) trafficserver-5.3.0.tar.gz

(3) libecap-1.0.0.tar.gz

(4) prefetched.tar.gz

(5) extract.sh

(6) Setup_precompile

(7) squid-ecap-zip.tar.gz

(8) squid.conf

(9) ecap_adapter_prefetch-1.0.0.tar.gz

1.2installation of software (1)Dependent Library Installation

Installing zlib,zlib-devel Libraries

# yum-y Install zlib zlib-devel

Installing libxml2,libxml2-devel Libraries

# yum-y Install LIBXML2 libxml2-devel

Edit /ect/ld.so.conf file

Add the following content

Execute the following command

# Ldconfig

(2) InstallationEcapLibrary

Unzip the ecap Library

# tar XZVF libecap-1.0.0.tar.gz

Go to the unpacked directory.

# CD libecap-1.0.0

To configure and install

# Make Distclean

#./configure

# Make && make install

(3) Note:

To see If there is a libxml2 directory under /usr/local/lib/ , execute the following command

# Cd/usr/local/lib

# LL | grep libxml2

If libxml2is displayed, move the libxml folder under libxml2 to the upper-level directory

Execute the following command

# cd/usr/local/lib/libxml2/

# MV Libxml. /

(2)installationSquid

Modify the limitations of system file descriptors

Edit /etc/security/limits.conf, add content at the end of the file

Restart the operating system and execute the command

# Ulimit-n

Displaying a number of 65536 indicates a successful modification

Generate squid before compiling the configuration file

Place extract.sh and setup_precompile in the same directory and do the following:

config.sh will be generated in the current directory after execution

L Extract squid, compile, install

# tar XZVF squid-3.5.4.tar.gz

Put the config.sh generated in the previous step into the extracted directory

# CD Squid-3.5.4.tar.gz

#./config.sh

# Make && make install

After the installation is complete,squid will be in the /usr/local/ directory

(3)installationEcapPlugins
    • Installing the gzip plugin

# tar XZVF squid-ecap-gzip-master.tar.gz

# CD Squid-ecap-gzip-master

# Make Distclean

#./configure

# Make && make install

    • Installing the prefetch plugin

# tar XZVF ecap_adapter_prefetch-1.0.0.tar.gz

# CD ecap_adapter_prefetch-1.0.0

# Make Distclean

#./configure Pkg_config_path =/usr/local/lib/pkgconfig/

# Make && make install

The plugin will be installed under /usr/local/lib/

    • Installing the prefetchd program

#tar XZVF prefetchd.tar.gz

#cd Prefetchd

#make Distclean

#make

The daemon is generated after make prefetchd

(4)installationTrafficserver

#yum Install SSL Tcl-devel

# tar XZVF trafficserver.tar.gz

# CD Trafficserver.tat.gz

#./configure--prefix=/usr/local/ts

#make && make Install

1.3Software startup

Main station

(1) Start squid

#useradd Squid

#chown Squid:squid/$suqidHome/var/log/

#mkdir/var/cache1

#chown Squid:squid/$chache

#cd/usr/local/squid

#cp./etc/squid.conf./etc/squid.conf.bak

# Copy the modified squid.conf file to /usr/local/squid/etc

#/usr/local/squid/sbin/squid-z

#/usr/local/squid/sbin/squid

Station

(2) Modify the configuration file

Edit /etc/resolv.conf, Add content

NameServer 127.0.0.1

Trafficserver configuration file in the /usr/local/ts/etc directory

Edit the main profile records.conf, modify the content

① specifies that the listening port is 3128

CONFIG proxy.config.http.server_ports STRING 3128

② Enable the push function of TS

CONFIG proxy.config.http.push_method_enabled INT 1

③ Open Cache

CONFIG proxy.config.http.cache.http INT 1

④ closing the request header limit

CONFIG proxy.config.http.cache.required_headers INT 0

⑤ Turn on parent agent

CONFIG proxy.config.http.parent_proxy.file STRING Parent.config

CONFIG proxy.config.http.parent_proxy_routing_enable INT 1

The ⑥ is formulated into a forward proxy mode

CONFIG proxy.config.url_remap.remap_required INT 0

CONFIG proxy.config.reverse_proxy.enabled INT 0

CONFIG PROXY.CONFIG.URL_REMAP.PRISTINE_HOST_HDR INT 0

CONFIG proxy.config.dns.nameservers STRING NULL

CONFIG proxy.config.http.no_dns_just_forward_to_parent INT 1

Edit ip_allow.conf, Add content

src_ip=192.168.1.200 Action=ip_allow Method=all

This means that any HTTP method from 192.168.1.200 is passed, and if you do not add a change to the sentence, it will cause prefetchd Push There was a problem with the operation.

Edit the parent.conf file, add the content, and specify the 3128 Port that the parent agent is 192.168.1.200

Dest_domian=. Parent= "192.168.1.200:3128" Round_robin=false

Start Trafficserver

Bin/trafficserver start

Clean up the cache

Bin/traffic_server-cclear

(3) Start the prefetchd process on the main station

System optimization Configuration

Two. Squid hit rate analysis
/usr/local/squid/bin/squidclient-p Mgr:info
/usr/local/squid/bin/squidclient-p Mgr:5min
Can see detailed performance situation, where port is your proxy port, 5min can be 60min

Get Squid Running status information: Squidclient-p mgr:info
Get Squid Memory usage: squidclient-p mgr:mem
Get a list of squid already cached: Squidclient-p mgr:bjects. Use it carefully,it may crash
Get squid disk usage: squidclient-p MGR:DISKD

Third, regular removal of invalid data in Swap.state
/path/to/squid/sbin/squid-k rotate-f/path/to/squid/squid.conf

Edit the /etc/sysctl.conf file to add the following

Execute the sysctl-p command after saving to make the changes take effect

Instructions for using HTTP acceleration software

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.