數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#1 2007-12-30 00:03:58

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

P2P 另一章 - 安裝 aMule

玩過 P2P 的玩家都知道在 Windows 底下有個 eMule,在 Linux 上則有一套相對應的軟件叫做 aMule,查一下 ipkg 內建套件,就可以看到aMule的存在。

$ ipkg list | grep amule

1.安裝aMule
既然有這套件,我們就來裝看看吧。

$ ipkg install amule

2.產生設定檔
接下來我們開始參考NSLU2-Linux上的這篇文章來設定。
在命令列下設定HOME環境變數後執行amuled以產生設定檔

$ export HOME=/opt/share/amule
$ amuled

執行完畢會自動產生 /opt/share/amule/.aMule/amule.conf 設定檔
作者建議把設定檔裡的 IPFiltering 功能關閉(IPFilterAutoLoad=0),以節省系統資源
注意:這裡的HOME環境變數只是為了產生aMule設定檔而暫時變更,重啟後會回覆原來設定。

3.下載server.met檔
http://www.server-met.de/ 下載 server.met 取代原來的 /opt/share/amule/.aMule/server.met 檔

4.產生密碼
命令列下

$ echo -n 你的密碼 | md5sum | cut -d ' ' -f 1

會產生一串編碼過的字串,記下該字串。
編輯amule.conf

[ExternalConnect]
AcceptExternalConnections=1
ECAddress=
ECPort=4712
ECPassword=填上密碼轉換的字串
ShowProgressBar=1

5.防火牆設定
若外部有防火牆,請在外部防火牆上將TCP 4662, UDP 4672 & UDP 4665等port指向aMule主機IP
若是直接接internet者,記得改/usr/local/sbin/post-firewall設定

#!/bin/sh
iptables -D INPUT -j DROP

# Port 4662 (TCP) for eMule, 4662+3 & 4672 (UDP) for Kad
iptables -A INPUT -p tcp --dport 4662 -j ACCEPT
iptables -A INPUT -p udp --dport 4665 -j ACCEPT
iptables -A INPUT -p udp --dport 4672 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P OUTPUT ACCEPT

iptables -A INPUT -j DROP

改完記得把設定寫回flash

$ flashfs save
$ flashfs commit
$ flashfs enable

6.檢驗設定檔
再執行amuled一次,測試設定檔是否正確:

$ amuled

若一切正常,建議重新開機,系統會自動執行amule deamon。
基本上,以上設定已經完成主機端的設定,至於操作界面,則有三種,分別是AmuleWEB、AmuleCMD及Remote GUI,下一篇再來討論操作界面的設定。





技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#2 2007-12-30 12:42:43

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: P2P 另一章 - 安裝 aMule

前面提到的三種操作界面:AmuleWEB、AmuleCMD及Remote GUI,其界面都不一樣。

先從簡單的說起。
1.AmuleCMD
AmuleCMD 是一種透過命令列方式下指令與aMule溝通的界面,雖然簡單,但是文字界面不似GUI界面來得親切。

第一次設定方式同安裝步驟,必須設定HOME=/opt/share/amule

$ export HOME=/opt/share/amule
$ amulecmd

這時你就可以嘗試下指令來操作,若不懂怎麼操作,可以打'help'來列出所有指令說明,但是別來問我,我也不熟 tongue

2.Remote GUI
Remote GUI 必須先去到 http://sourceforge.net/project/download … p&80180482 去下載 aMuleGUI-2.1.3-MSW.zip 的軟體。解壓縮後直接執行,輸入密碼即可進入操作界面,這界面類似 eMule 的界面,有用過的應該很快就能上手。
https://digiland.tw/img/upload/amulegui_20071230.gif

3.AmuleWEB
顧名思義就是透過Web界面來操作,所以在主機端必須啟動aMule內建小型的 Web Server。

同樣安裝前,必須設定HOME=/opt/share/amule

$ export HOME=/opt/share/amule
$ amuleweb -w

執行完畢會產生 /opt/share/amule/.aMule/remote.conf 設定檔,同樣地,我們必須變更 remote.conf 裡頭的密碼設定。

Locale=
[EC]
Host=localhost
Port=4712
Password=填上密碼轉換的字串
[Webserver]
Port=-1
Template=php-default
UseGzip=0
AllowGuest=0
AdminPassword=填上密碼轉換的字串
GuestPassword=填上密碼轉換的字串

另外開啟 /opt/share/amule/.aMule/amule.conf
找到[WebServer]修改其設定如下:

[WebServer]
Enabled=1
Password=填上密碼轉換的字串
PasswordLow=
Port=4711
UseGzip=1
UseLowRightsUser=0
PageRefreshTime=120
Template=php-default

關閉、重啟 aMule

$ /opt/etc/init.d/S57amuled stop
$ /opt/etc/init.d/S57amuled start

這時從Client端用IE連進來試試看:
http://192.168.1.1:4711/
理論上輸入密碼,即可進入操作界面,不過我一直試不出來,一直停在輸入密碼畫面 orz
https://digiland.tw/img/upload/amuleweb_20071230.gif

綜合上述三種界面,我個人覺得 Remote GUI 界面與之前的 eMule 較為類似,而且也有中文界面,使用起來比較容易上手,另一方面也減輕主機端上面的負載,在此推薦使用。

怎麼樣?想開始養動物了嗎?那就讓WL來幫你實現夢想吧 milk

參考文件: http://www.nslu2-linux.org/wiki/Optware/Amule




技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#3 2008-01-03 01:07:11

yatere
新生
註冊日期: 2007-12-15
文章數: 5
目前積分 :   

Re: P2P 另一章 - 安裝 aMule

呵呵,谢谢啦,
我正好喜欢!


離線

 

#4 2008-01-04 10:02:55

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: P2P 另一章 - 安裝 aMule

yatere 提到:

呵呵,谢谢啦,
我正好喜欢!

順便試一下AmuleWEB能不能成功...



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#5 2008-01-31 00:27:36

chs007
精靈
註冊日期: 2008-01-30
文章數: 24
目前積分 :   

Re: P2P 另一章 - 安裝 aMule

感謝版主的教學,安裝好了~!!
但是有個問題...
防火牆已經設定好了,KAD連不上,SERVER卻顯示高ID(第一次連是LOW ID)
速度很慢(TOTAL:4K/sec),我下載的4個電影檔案應該不會這麼慢的速度才對
aMule是第一次使用,這樣的速度算正常嗎??

忽然正常了.....上傳50.8/下載108

我用aMuleGUI-2.1.3設定上下傳比例然後就正常了.....WL-500W真是充滿傳奇阿....
改天來試試MLdobkey......


最後修改: chs007 (2008-01-31 01:51:59)


離線

 

#6 2008-01-31 08:42:05

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: P2P 另一章 - 安裝 aMule

chs007 提到:

感謝版主的教學,安裝好了~!!
但是有個問題...
防火牆已經設定好了,KAD連不上,SERVER卻顯示高ID(第一次連是LOW ID)
速度很慢(TOTAL:4K/sec),我下載的4個電影檔案應該不會這麼慢的速度才對
aMule是第一次使用,這樣的速度算正常嗎??

忽然正常了.....上傳50.8/下載108

我用aMuleGUI-2.1.3設定上下傳比例然後就正常了.....WL-500W真是充滿傳奇阿....
改天來試試MLdobkey......

呵..恭喜你也脫胎換骨了 clapping



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#7 2008-05-25 13:39:05

tyhuang19
新生
註冊日期: 2008-05-23
文章數: 3
目前積分 :   

Re: P2P 另一章 - 安裝 aMule

想請教一下,當我執行
$ echo -n 你的密碼 | md5sum | cut -d ' ' -f 1
它秀出了一段指令
-ash: md5sum: not found
請問一下,我是否少裝了什麼樣的opt呢??
謝謝您的幫忙!!


離線

 

#8 2008-05-26 08:29:24

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: P2P 另一章 - 安裝 aMule

tyhuang19 提到:

想請教一下,當我執行
$ echo -n 你的密碼 | md5sum | cut -d ' ' -f 1
它秀出了一段指令
-ash: md5sum: not found
請問一下,我是否少裝了什麼樣的opt呢??
謝謝您的幫忙!!

應該是你的系統缺少 md5sum 指令,我不確定該裝什麼 pkg,你可以試試看

ipkg list | grep md5

系統會列出關於 md5 相關的 pkg,你再嘗試安裝看看吧。



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#9 2008-05-26 13:51:52

tyhuang19
新生
註冊日期: 2008-05-23
文章數: 3
目前積分 :   

Re: P2P 另一章 - 安裝 aMule

Aven 提到:

tyhuang19 提到:

想請教一下,當我執行
$ echo -n 你的密碼 | md5sum | cut -d ' ' -f 1
它秀出了一段指令
-ash: md5sum: not found
請問一下,我是否少裝了什麼樣的opt呢??
謝謝您的幫忙!!

應該是你的系統缺少 md5sum 指令,我不確定該裝什麼 pkg,你可以試試看

ipkg list | grep md5

系統會列出關於 md5 相關的 pkg,你再嘗試安裝看看吧。

謝謝你的回覆,晚上我回家再試試thankgod


離線

 

#10 2008-06-11 01:21:10

zchwy
祭司
註冊日期: 2008-04-05
文章數: 101
目前積分 :   

Re: P2P 另一章 - 安裝 aMule

版主你好,请帮我看看哪个地方出错了
1、$ ipkg install amule
没问题,就是用的时间长了点
2產生設定檔
$ export HOME=/opt/share/amule
$ amuled
更改 IPFilterAutoLoad=0
下載 server.met 取代原來的 /opt/share/amule/.aMule/server.met
4、產生密碼  $ echo -n 你的密碼 | md5sum | cut -d ' ' -f 1
   两次同样的用户名MD5竟然不同,不知道对不对?

5、編輯amule.conf
   編輯/usr/local/sbin/post-firewall
   没问题
6、$ flashfs save
   $ flashfs commit
   $ flashfs enable
   没问题
7、amuled  问题来了,请帮我看看
   muled: OnInit - starting timer                               
Initialising aMule                 
Checking if there is an instance already running...                                                   
No other instances are running.                               
ERROR: Warning Warning! You are                             
Doing so is not recommended for security reasons,                                       
         
and you are advised to run aMule as an normal                                             
user instead.             

--------------------------------------------------                                                 
Warning! You are running aMule as root.                                       
Doing so is not recommended for security reasons,                                               
 
and you are advised to run aMule as an normal                                             
user instead.             
--------------------------------------------------                                                 

Loading temp files from /usr/local/root/.aMule/Temp.                           

All PartFiles Loaded.
ListenSocket: Could not listen to TCP port.ERROR: Error Port 4662 is not availab
le!

This means that you will be LOWID.

Check your network to make sure the port is open for output and input.

External connections disabled in config file
*** Server UDP socket (TCP+3) at 0.0.0.0:4665
*** TCP socket (TCP) listening on 0.0.0.0:4662
Port 4662 is not available. You will be LOWID
*** Client UDP socket (extended eMule) at 0.0.0.0:4672
Empty dir /usr/local/root/.aMule/Incoming/ shared

ERROR: aMule daemon cannot be used when external connections are disabled. To en
able External Connections, use either a normal aMule or set the key"AcceptExtern
alConnections" to 1 in the file ~/.aMule/amule.conf

Now, exiting main app...
aMule OnExit: Terminating core.
aMule shutdown completed.

谢谢!!!


離線

 

相關討論主題

主題 回覆 點閱 最後發表
0 6679 2010-02-22 13:49:46 作者 sdlla

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed