Debian/ubuntu/centos VPS Installation Net-speeder and optimized

Source: Internet
Author: User
Tags centos vps vps

Installation process:

CentOS Installation

wget--no-check-certificate https://gist.github.com/LazyZhu/dc3f2f84c336a08fd6a5/raw/ d8aa4bcf955409e28a262ccf52921a65fe49da99/net_speeder_lazyinstall.sh
SH net_speeder_lazyinstall.sh

After installation, re-typing:
nohup /usr/local/net_speeder/net_speeder venet0 "ip" >/dev/null 2>&1 &
Note that the IP in the quotation mark does not need to move, some place says need to change to own IP address, actually does not have to change!

Close Net_speeder:

killall net_speeder

Debian/ubuntu One-button package

wget--no-check-certificate Https://raw.githubusercontent.com/tennfy/debian_netspeeder_tennfy/master/debian_ netspeeder_tennfy.sh
chmod a+x debian_netspeeder_tennfy.sh
Bash debian_netspeeder_tennfy.sh

From Tennfy

See if Net-speeder is running
ps aux|grep net_speeder|grep -v grep
Stop Net-speeder
killall net_speeder
Start Net-speeder (OPENVZ environment)
nohup /root/net_speeder venet0 "ip" >/dev/null 2>&1 &

Note: Installation under CentOS requires additional epel sources, and there are tutorials on Github that you can see
1. Install the dependent libraries for running and compiling
apt-get install libnet1;apt-get install libpcap0.8;apt-get install libnet1-dev;apt-get install libpcap0.8-dev
2. Download the source to the server
cd /var;wget https://github.com/snooda/net-speeder/raw/master/net_speeder.c;wget https://github.com/snooda/net-speeder/raw/master/build.s
3. Compiling
chmod +x build.sh;./build.sh -DCOOKED
4. Run and join the boot start
nohup /var/net_speeder eth0 "ip";echo "nohup /var/net_speeder eth0 "ip" >/dev/null 2>&1 &" >> /etc/rc.local

Optimization

Because of the double packet, compared to eat traffic, but also to network resources caused a high occupancy, so we can only in peak congestion time to open net-speeder, in normal time off it.

1. Set the time zone (General LNMP, etc. a key package environment is already set by default)
echo "Asia/Shanghai" >/etc/timezone
2. Set the timer switch

Echo ' 0 * * * root nohup/root/net_speeder venet0 "IP" >/dev/null 2>&1 & ' >>/etc/crontab
echo "0 2 * * * root killall Net_speeder" >>/etc/crontab
/etc/init.d/cron restart

Note: According to my experience, the time of the day when the United States over 24 points after the domestic visit delay is soaring, so we set here is 13, 2 o'clock midnight closed.

Precautions

The following conditions are not suitable for use with Net-speeder:

      1. Small traffic VPS, because using Net-speeder will consume double traffic.
      2. Mainly provide web pages, pictures and other small file access. Net-speeder for downloading large files, proxy access to video sites and other effects better, and small file acceleration effect is not obvious.
      3. Need to use network software such as PPTPD, which does not support double packets. Net-speeder will cause these software to not work properly.
      4. If the line itself is good and there is no delay, the use of the Net-speeder effect is counterproductive.

Debian/ubuntu/centos VPS Installation Net-speeder and optimized

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.