分享
 
 
 

How to download the LFS tarballs via eDonkey

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

AUTHOR: Jeroen Coumans <jeroen at linuxfromscratch dot org>

DATE: 2003-11-07

LICENSE: GNU Free Documentation License Version 1.2

SYNOPSIS: How to download the LFS tarballs via eDonkey

DESCRIPTION:

A legitimate and increasingly popular option for distributing packages online is

via peer-to-peer (P2P) networks. This hint describes how to install and

configure mlDonkey.

PREREQUISITES:

A broadband Internet connection and some patience.

HINT:

A bit of history:

The first succesful P2P network was Napster. By sharing music the program attracted millions of users. It

wasn't used for much legal content though, which is why it got shut down. Basically, Napster worked by

connecting people's clients to each other via servers. The servers were comparable to catalogues and were

used to store the information of what each client offered.

More recent P2P networks use a decentralized approach to filesharing. The most popular variants nowadays

are the Fasttrack network, used by Kazaa, and the eDonkey network. The eDonkey protocol (and the

popularized implementation of eMule) has the following features:

* Files can be downloaded from different sources at the same time.

* Files are identified by unique identifiers (MD4) that can be used to find new

sources for a file.

* Files are checked using checksums, and chunks (9MB) that are corrupted are

downloaded again.

* Files chunks can be downloaded in any order.

* Files are shared as soon as a checked chunk has been downloaded, to speed up

the spreading of files.

* Need some servers to be known, mldonkey can use servers.ini file that is in

the distribution.

(list copied from the mlDonkey wiki)

On http://www.linuxfromscratch.org/lfs/packages.html you find several

eDonkey links. These can be used to download the LFS packages tarball via an

eDonkey client. Lucky for us, the protocol has several fully-functional open

source implementations (xmule, amule, emule, mldonkey). You can also use the

official implementation (edonkey and overnet), although it has little advantages

over the others and is only available as binary (big no-no for LFS'ers). I'll

only explain how to install and use mlDonkey though, since that is what I have

actual experience with. If people are willing to contribute instructions for

their favorite client, I'll gladly put it in here. :)

About eDonkey:

eDonkey works with queues: if you start a download, you'll get placed in the

queue of everyone who shares that package. Downloading costs you points while

uploading gains you points so you are rewarded for sharing. Whatever you

download gets automatically shared.

Some rules of thumb to keep in mind:

1. you probably want to regulate how much bandwidth your client can use, and

2. the longer your client runs, the faster your downloads will go. In the

beginning, they'll be slow. I recommend letting it run as long as you can

afford your computer to be online (mine is 24x7).

3. the more people who share a certain file, the faster your download will go.

mlDonkey:

mlDonkey requires ocaml for compilation and lablgtk for the ugly

GTK-1.2-based GUI. You can use --enable-batch to wget and install them locally

just for mlDonkey, or install them seperately if you're paranoid. Skip the

installation of ocaml and lablgtk if you intend to use --enable-batch.

Download ocaml from:

http://caml.inria.fr/distrib/ocaml-3.06/ocaml-3.06.tar.gz

Installing ocaml the way mlDonkey would:

./configure -prefix /usr -no-tk -with-pthread &&

cd config &&

mv Makefile Makefile.old &&

sed "s/OTHERLIBRARIES=.*/OTHERLIBRARIES=unix dynlink num str bigarray threads/" Makefile.old > Makefile &&

cd .. &&

make world opt opt.opt &&

make INSTALL_MANODIR=/tmp install

There are several GUI implementations for mlDonkey. You can use them next to

each other since they all use a client-server model to communicate with the

mlDonkey daemon. It is not required to install any GUI though, since you can

also communicate with the mlDonkey daemon via telnet or via a webbased GUI. To

build the GTK-1.2-based GUI bundled with mlDonkey, you require lablgtk.

Download lablgtk from:

http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-1.2.6.tar.gz

Install lablGTK:

make configure &&

make &&

make opt &&

make install

Installing mlDonkey:

Get your source from http://savannah.nongnu.org/download/mldonkey/ . The current

stable release can be downloaded from

http://savannah.nongnu.org/download/mldonkey/release-2.5-4/official/mldonkey-2.5

-4.tar.gz. Compile it with the following commands:

./configure --prefix=/usr &&

make &&

make install

If you only want to use mlDonkey for the eDonkey network, add --disable-multinet

to configure options. If you want to disable the gui: --disable-gui. Check

--help for other options.

To install the G2Gui:

Haven't tried compiling it yet, but installing the GTK2 or Motif version is a

breeze. Download the appropriate file from

http://developer.berlios.de/project/showfiles.php?group_id=610, unpack it and

run g2gui.sh. It needs a Java VM in the path though.

Running mlDonkey:

It is recommended to use a seperate user for mlDonkey, for example "mldonkey".

Make sure it is an unique user who only has access to his home directory. I use

the following commands to start mldonkey with daemontools' setuidgid:

cd /home/mldonkey/exec /usr/bin/env - PWD=/home/mldonkey /sbin/setuidgid mldonkey

/usr/bin/mlnet -stdout

A similar command which uses su would go like this:

su - mldonkey;

cd $HOME

/usr/bin/env -i HOME=$HOME SHELL=/bin/bash /bin/bash --noprofile --norc

/usr/bin/mlnet -stdout

The daemon now runs and outputs a lot of messages. You can run it in the

background by leaving out the -stdout and putting an ampersand (&) at the end of

the line. You can also run it supervised with daemontools. The first thing the

daemon tries to do is connect to a server. Allthough the eDonkey protocol is

decentralized and functions server-less, servers are used as catalogues to speed

up searches. mlDonkey comes with a large serverlist and automatically maintains

its server lists, so this part doesn't require any action. If you have trouble

connecting, your firewall may be blocking the daemon. My BLFS firewall allows

mlDonkey to work with the following line:

iptables -A INPUT -p tcp --dport 4662 -m state --state NEW,ESTABLISHED -j ACCEPT

You may check the following resources if that doesn't work though (watch line

wrapping):

http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=FireWall

http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=WhatFirewallPortsToOp

en

http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=IPTables

Last but not least: it's also possible to compile mlDonkey statically and

install it in a chroot. This shouldn't be a lot of work for people who are

experienced in that sort of thing.

Configuring mldonkey:

You can control mldonkey via several ways:

* via your browser: http://127.0.0.1:4080/

* via the GTK gui: mldonkey_gui

* via telnet: telnet 127.0.0.1 4000

Start downloading files by using the input field in your browser,

the ed2k:// field at the bottom of the Downloads tab in the GUI or by "dllink

ed2k://" via telnet. If you like to share files, put them in

/home/mldonkey/incoming/ and they'll automatically be shared.

To enable Mozilla/MozillaFirebird to automatically download ed2k:// links, copy

/usr/src/mldonkey/distrib/ed2k_mozilla/src/ed2kprotocol.js to

/usr/lib/mozilla/components/ed2kprotocol.js. Now all links on the LFS packages

page work! To use mldonkey with KDE/Konqueror, install the program at

http://www.gibreel.net/projects/kmldonkey/

Links:

Official edonkey homepage: http://www.edonkey2000.com/

Official mldonkey homepage: http://www.nongnu.org/mldonkey/

mldonkey world (community page): http://mldonkey.berlios.de/

mldonkey FAQ: http://www.nongnu.org/mldonkey/faq.html

ACKNOWLEDGEMENTS:

* None yet

CHANGELOG:

[2003-11-06]

* Initial hint.

[2003-11-07]

* Spell fixes. Added information about the different GUI's.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有