2011-05-02 132 views
6

我想在我的亞馬遜Ec2窗口實例上安裝FTP服務, 我對此有一些疑問。如何在亞馬遜Ec2上安裝和配置FTP?

  1. 這是一個很好的FTP惡魔安裝EC2實例上的Windows EC2服務。
  2. 我們可以像在窗口服務器上使用窗口CD一樣安裝FTP。
  3. 在Ec2服務器上的任何教程或視頻的安裝和配置FTp幫助我們?

請在這方面幫助我。謝謝

回答

5

Windows EC2實例都是Windows Server 2008.最簡單的事情就是啓用內置的FTP功能。

請參閱http://www.youtube.com/watch?v=QsGPqkobCs8

+0

這是幫助FUL – Arsalan 2011-05-02 11:16:02

+3

此外,因爲這個問題是AWS爲中心,不要忘記這一點:登錄EC2管理控制檯,轉到安全組,選擇實例所屬的安全組,單擊入站選項卡,創建新的自定義TCP規則,允許端口21.否則,上述視頻方法將無法工作,因爲亞馬遜防火牆將覆蓋Windows防火牆。 – Zeeshan 2013-06-24 20:15:37

+0

之後,我被卡在:'狀態:\t服務器發送帶有不可路由地址的被動回覆。使用服務器地址instead.' '命令:\t LIST' '響應:\t 150打開二進制模式數據connection.' '響應:\t 550數據信道定時out.' '錯誤:\t無法檢索目錄listing' – Zeeshan 2013-06-24 20:19:54

9

在這裏,您將找到一個很好的教程,解釋您可能遇到的嘗試在amazon EC2實例上設置ftp服務器的內部工作和問題。

這也解釋了爲什麼只是打開亞馬遜防火牆上的端口21不起作用。那裏的例子使用免費的filezilla ftp服務器和客戶端,但任何可以使用。

http://me-ol-blog.blogspot.com/2011/03/how-to-install-ftp-server-on-amazon-aws.html

編輯(24月 - 2013年):

因爲對於計算器的最佳政策做法表示不依賴於鏈接,我複製從我的博客在這裏的信息:

如何在Amazon EC2 AWS安裝FTP服務器

This seems to be a big issue as people usually waste a lot of time on this. 

The problem lies with 2 elements: the security group settings & the ftp server settings. 

FTP is not considered a good solution for passing files between EC2 instances and your computer as it is not firewall "friendly" - you can't just open port 21/TCP on the amazon security group settings because the server is actually sitting on a NAT address and when an ftp client connects to an FTP server using PASV mode then the server tells the client which port and which address to use for the data stream (like directory listing). 

If you want an alternate easy solution for transferring files between yourself and the EC2 instance then setup a dropbox on both machines - it doesn't get easier than this... :) 

If you still want to set up an FTP server on your EC2 instance then read on... 

Typically, people just try to open port 21 and then try to connect and get something similar to: 

Status: Server sent passive reply with unroutable address. Using server address instead. 
Command: MLSD 
Response: 425 Can't open data connection. 

The solution is (and for this example I will explain how to perform the setting on FileZilla FTP server on windows): 

1. FileZilla FTP server: Edit-> settings -> Passive mode settings: 
(x) Retrieve external IP from: 
     http://ip.filezilla-project.org/ip.php 
[ this tells the ftp server to perform a 'whatismyip' and give that to the ftp client, you can also specifically put the address DNS name you use in your remote desktop in the "Use the following IP:", e.g., ec2-6-100-129-60.compute-1.amazonaws.com ] 

(x) Use custom port range: 
1024-1048 

[ these are the ports that will be given to the ftp client - we will open them in the following step in the Firewall ] 

2. Amazon security groups: open ports - 
    a. Custom TCP rule , Port range:21 
    b. Custom TCP rule, Port range:1024-1048 

3. Turn off the windows firewall on the EC2 machine (you don't need it - you have the amazon firewall) 

That's it, and just as side note, you don't need to use Elastic IP feature for this to work. 
Also don't forget to set your client to use PASV mode (which is typically the default). 

You can verify this works by reading the answer the server gives the client when it enters PASV mode: 

Command: PASV 
Response: 227 Entering Passive Mode (174,149,71,102,4,7) 

This response means: "Yo FTP client, use 174.149.71.102 and port 4*256+7=1031"