Ubuntu10.10 using P2P Update Software

Source: Internet
Author: User
P2P (Peer-to-Peer) is a "point-to-point technology". It can also be understood as direct data transmission between users. typical P2P technology representatives include BT and e. Many Linux users once dreamed that it would be nice to deliver software packages at a high speed like BT and donkey-not only to speed up their own speed, you can also share your downloaded software package with others-"everyone for me, everyone for me ". Apt-p2p is such a dream thing. Official website: http

P2P (Peer-to-Peer) is a "point-to-point technology". It can also be understood as direct data transmission between users. typical P2P technology representatives include BT and e.

Many Linux users once dreamed that it would be nice to deliver software packages at a high speed like BT and donkey-not only to speed up their own speed, you can also share your downloaded software package with others-"everyone for me, everyone for me ".

Apt-p2p is such a dream thing.

Http://www.camrdale.org/apt-p2p/

Apt-p2p, as the name suggests, is the direct transfer between the user and the user deb software package.

Advantages of P2P update software packages:

* You can obtain software packages from user nodes and download them from official sources.
* The more people use apt-p2p, the higher the transfer efficiency of the software package, the faster the speed
* Low CPU and memory resource consumption
* Hash verification is performed first before the software package is transmitted, ensuring maximum security and avoiding downloading to Damaged packages.
Disadvantages of P2P update software packages:
* If there are not many people using the apt-p2p, the speed may be less than the original apt-get.
* Although the probability is very small, there may still be potential hash spoofing, leading to system security risks.

At present, the domestic use of apt-p2p is indeed not many people, this situation may be the main reason to restrict the apt-p2p in the day to promote. But if everyone doesn't support apt-p2p, how can apt-p2p develop? How can we get the convenience of apt-p2p?

Procedure

1. Prepare the dependent Environment

Sudo apt-get install python-apt python-twisted python-twisted-web2

2. Install apt-p2p

Sudo apt-get install apt-p2p

3. modify the software source list (Note: The third source does not need to be modified)

Sudo cp/etc/apt/sources. list/etc/apt/sources. list. backup // backup software source

Sudo sed-I's % http: // localhost: 9977/% G'/etc/apt/sources. list

4. Configure apt-p2p as needed

Sudo gedit/etc/apt-p2p/apt-p2p.conf

Where

PORT = specifies the PORT used by the apt-p2p, which defaults to 9977 ". Of course, you can also specify it as "9527", but make sure it is consistent with the modification value in/etc/apt/sources. list.

"UPLOAD_LIMIT =" specifies the maximum upload speed. The default value is "0", which is unlimited. We recommend that you set it to "10 ~ 50 "(KB/sec)

"MIN_DOWNLOAD_PEERS =" specifies the number of available prees nodes before downloading from the official source. The default value "3" is recommended"

"CACHE_DIR =" is the package cache directory that specifies the apt-p2p, and the default value is recommended

"OTHER_DIRS =" specifies the directory of additional software packages. Note: Once specified, all files in this directory will be uploaded.

"UPLOAD_LIMIT =" specifies whether to download the data list of the software package and publish it. The default value is "yes". If your computer requires a high level of confidentiality, set it to "no"

"DHT-ONLY =" whether to use only the resources provided by the Distributed Hash, we recommend that you use the default "no"

5. If a firewall is installed, ports 9967 and 9977 must be opened. If a router is used, you need to configure the ing.

6. Restart the apt-p2p to apply the new configuration

Sudo rm-rf/var/cache/apt-p2p/cache /*

Sudo/etc/init. d/apt-p2p restart

7. start updating, upgrading the system, or installing software packages

Sudo apt-get update sudo apt-get upgrade

Update, install or use the software package, and still use the apt-get command

For example, to install MYSQL, enter apt-get install apt-get.

Note: Some tutorials describe to disable third-party sources, but the actual use of third-party sources does not affect third-party sources.

Methods To view apt-p2p health:

Enter http: // localhost: 9977/in the address bar of the browser to view the relevant information.

Uninstall apt-p2p Method:

Sudo apt-get remove -- purge apt-p2p

Sudo cp/etc/apt/sources. list. backup/etc/apt/sources. list

Sudo rm-rf/var/cache/apt-p2p /*

Sudo apt-get update

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.