您是否曾经想快速与朋友分享大型音乐、视频或数据文件,但又不想浪费太多时间先上传?有很多在线服务可以让您轻松地与他人共享文件,但它仍然需要您先实际上传文件。
共享文件的更快方法是简单地将您的计算机变成一个FTP 服务器(FTP server),以便用户可以远程连接并下载文件。Windows在专业版和旗舰版中具有用于设置(Professional and Ultimate editions)FTP 服务器(FTP server)的内置功能,但它需要相当多的技术知识才能开始工作。幸运的是,有几个开源程序可以大大简化流程,让您只需要自己配置一些东西。
在本文中,我将介绍几个可用于设置自己的FTP 服务器的(FTP server)开源文件服务器(source file server)应用程序。我还将讨论您需要采取的额外步骤,例如配置路由器和防火墙(router and firewall),以使设置正常工作。由于有许多编写良好的教程来设置这些应用程序,我将简单地链接到最好的一个,它将引导您逐步安装(step installing)和配置您选择的任何应用程序。
HFS(HTTP 文件服务器)
HFS(HTTP 文件服务器)(HFS (HTTP File Server))(HFS (HTTP File Server)) 已经存在了很长时间,并且是使用文件服务器(file server)与他人共享文件的最佳方式之一。它非常适合新手和高级用户,只需使用默认设置即可相当快速地进行设置。对于修补匠来说,它有一大堆其他选项可供配置。
它是高度可定制的,允许您创建帐户、查看文件的当前连接、关闭/结束连接、控制带宽使用等等!它就像一个Windows Server 文件服务器(Windows Server File server),只是它是免费的并且可以在网络上运行!
HFS最棒的地方在于它的易用性!它只是您只需运行的一个EXE 文件(EXE file),无需在您的计算机上安装任何东西!接下来只需将要共享的文件拖放到HFS中,即可启动并运行自己的文件服务器(file server)。
所有连接都可以通过托盘图标进行监控,您可以完全控制所有连接。您可以指定希望文件服务器(file server)在其上运行的IP 地址和端口号。(IP address and port number)它有大量可供您配置的选项,包括HTML 模板(HTML template)代码,因此您可以自定义文件服务器的(file server)外观(look and feel)。要开始,请下载EXE并运行它。您将看到的第一个对话框是一个Windows 安全警报(Windows Security Alert),告诉您该程序已被阻止。
在这里,您要检查专用网络(Private networks)选项并取消选中公共网络(Public Networks),然后单击允许访问(Allow access)按钮。接下来,系统会询问您是否要将HFS包含到shell 上下文菜单(shell context menu)中,这基本上意味着您可以右键单击资源管理器(Explorer)中的任何文件,立即将其添加到文件服务器(file server)以进行共享。
单击“是”或“否”后,将加载程序的主界面。请注意,它实际上并没有在您的系统上安装任何东西;它就像一个便携式应用程序一样运行。现在,您只需在左侧窗格中拖放一些文件即可开始使用。
您会注意到导航栏非常简单:菜单(Menu)、端口号(port number)和您所在的模式。默认情况下,它设置为简单模式,这对大多数人来说应该是非常好的。端口号(port number)是 80,仅当您希望某人通过网络连接到您的服务器时才需要该端口号。如果有人通过FTP连接下载文件,您只需向他们提供您的公共IP 地址(IP address),端口号(port number)将为 21。
使用网络界面(web interface),他们也可以浏览文件并从那里下载。无论哪种情况,您都必须将FTP (21) 或Web (80) 端口从路由器转发到运行HFS的计算机。您可以在下面的防火墙和端口转发部分(Firewall and Port Forwarding section below)了解如何执行所有这些操作。继续并单击在浏览器中打开(Open in browser)按钮,它应该会为您的文件服务器加载(file server)Web 界面(web interface),其中包含您之前添加的所有文件的列表。
设置防火墙和路由器以通过(firewall and router)Internet访问您的计算机后,您可以使用HFS执行自检以确保一切正常。只需单击(Just click)菜单,(Menu)第一个选项是Self Test。
现在跳到最后一节,我解释了从本地网络外部访问文件服务器所需完成的不同步骤。(file server)
FileZilla 服务器
Filezilla 是一个流行的FTP 客户端(FTP client)程序,但它们也有一个免费提供的服务器版本(server version)。安装过程中默认选项保持不变也很容易设置。
安装时,系统会要求您选择安装FileZilla的方式,最好保留它,使其作为Windows 服务(Windows service)安装。您也可以将端口号(port number)保留为默认值(default value)。单击下一步(Click Next),然后将询问您应该如何启动服务器。除非您想手动启动它,否则默认行为是在(default behavior)用户登录(user logs)时自动加载。单击安装(Click Install),它应该会在几秒钟内完成。
将弹出一个小窗口,显示服务器的基本信息。如果您不打算(t plan)在同一台计算机上创建任何其他FTP 服务器(FTP server),请选中始终连接到此服务器复选框。(lways connect to this server)单击确定(Click OK),将出现主界面。
在FileZilla中(FileZilla)设置目录(directory setup)还有几个步骤,但我们在HowToGeek的朋友写了一篇很棒的文章,引导您完成(HowToGeek)设置 FileZilla(setting up FileZilla)的其余过程。
自由NAS
我要提到的最后一个产品是FreeNAS,它只是一个很棒的开源程序(source program),用于创建您自己的网络附加存储设备(storage device)。尽管FreeNAS可以做很多其他的事情,但它的基本目标是让共享文件更容易。
FreeNAS和我上面提到的其他两个程序的唯一区别是前者实际上是一个完整的操作系统(operating system)。如果你想使用FreeNAS,你将不得不专门为它使用一整台机器!此外,它确实有某些系统要求,可能会阻止您在特定 PC 上使用它。
无论如何,如果您有一台闲置的备用机器,而您一直无法找到用途,那么也许现在是时候将其转换为流式传输和共享超级NAS了。
MakeUseOf的人写了一个安装和设置 FreeNAS(setting up FreeNAS)的综合指南,只是为了在Internet上共享文件。他们还讨论了如何设置动态DNS,以便您可以从本地网络外部访问您的服务器。
防火墙和端口转发
如前所述,要让其中任何一个在您的家庭网络(home network)之外工作,您最多需要做三件事:
1.在本地Windows防火墙(Windows firewall)上为PC打开端口( HFS和FileZilla(HFS and FileZilla))
2.将某些端口(FTP、WEB等)从您的路由器转发到您的PC(Forward)
3.使用动态DNS设置您的家庭服务器(home server),以便可以通过URL而不是IP地址(IP address)访问它,IP地址可能随时更改。
第三个选项是可选的,因为您可以只查找您的外部IP 地址(IP address)并将其提供给需要访问服务器的人。但是,如果您没有静态IP 地址(IP address)而大多数住宅都没有,那么IP 地址(IP address)可以随时更改。通常,它会在几天内保持不变,所以如果您一直需要传输文件,那么不要担心选项 3(option 3)。如果您不知道我在说什么,请查看我的帖子,该帖子解释了静态 IP 地址和动态IP 地址(IP address)之间的区别。
我写了一篇详细的文章,解释了端口转发(port forwarding)以及你应该如何配置它。http://www.portforward.com/了解有关在路由器上转发端口的更多信息。
我还写过关于动态DNS的文章,以及如何让自己获得一个易于记忆的URL ,即使它发生变化,它也会自动指向你的公共IP 地址。(IP address)
希望这能让您顺利在家中设置文件共享服务器。这将花费一些时间,并且您会在此过程中遇到一些小问题,但这对大多数人来说是完全可行的。如果您有任何问题或遇到无法解决的问题,请发表评论,我们会尽力提供帮助。享受!
Share Large Files by Setting Up a Home File Server
Have you ever wanted to share large muѕic, video, or data files with frіends quickly, but didn’t want to waste so much timе uploading them first? There are a lot of online serviсes that let yоu share files with others easily, but it still requires you to actually upload the file first.
The faster way to share files is to simply turn your computer into an FTP server so that users can connect remotely and download the files. Windows has a built-in feature for setting up a FTP server in the Professional and Ultimate editions, but it requires quite a bit of technical knowledge to get working. Luckily, there are a couple of open source programs that streamline the process considerably, leaving you with only a few things to configure on your own.
In this article, I’m going to go through a couple of open source file server applications that you can use to setup your own FTP server. I’ll also talk about the extra steps you need take, like configuring your router and firewall, to get the setup working properly. Since there are many well written tutorials for setting up each of these applications, I will simply link to the best one that will walk you step by step installing and configuring whichever app you choose.
HFS (HTTP File Server)
HFS (HTTP File Server) has been around for a long time and is one of the best ways to share your files with others using a file server. It’s great for novice and advanced users alike and can be setup fairly quickly with just the default settings. For the tinkerers, it has a whole bunch of other options to configure.
It’s highly customizable and allows you to create accounts, view current connections to your files, close/end connections, control bandwidth usage, and a lot more! It’s like a Windows Server File server except that it’s free and works over the web!
The best thing about HFS is how easy it is to use! It’s simply one EXE file that you just run, no need to install anything on your computer! Next just drag and drop the files you want to share into HFS and you’re up and running your own file server.
All connections can be monitored via a tray icon and you have full control over all connections. You can specify the IP address and port number that you want the file server to run on. It has a ton of options that you can configure, including the HTML template code, so you can customize the look and feel of your file server. To get started, download the EXE and run it. The first dialog you’ll see is a Windows Security Alert telling you the program is blocked.
Here you want to check the Private networks option and uncheck Public Networks before clicking on the Allow access button. Next you’ll be asked if you want to include HFS to the shell context menu, which basically means you can right-click on any file in Explorer instantly add it to the file server for sharing.
Once you click Yes or No, the main interface for the program will load. Note that it does not actually install anything on your system; it just runs like a portable app. Now all you have to do to get started is drag and drop some files in the left pane.
You’ll notice the nav bar is very simple: Menu, the port number and the mode you are in. By default, it’s set to easy mode and this should be perfectly fine for most people. The port number is 80 and that’s only needed if you want someone to connect via the web to your server. If someone is connecting over FTP to download a file, you’ll just give them your public IP address and the port number will be 21.
Using the web interface, they could browse the files and download from there too. In either case, you will have to forward the FTP (21) or Web (80) ports from your router to the computer running HFS. You can read about how to do all of that when in the Firewall and Port Forwarding section below. Go ahead and click the Open in browser button and it should load up the web interface for your file server with a list of any files you added earlier.
Once you have setup the firewall and router for access to your computer over the Internet, you can perform a self-test using HFS to make sure everything is working properly. Just click on Menu and the first option is Self Test.
Now skip down to the last section where I explain the different steps you need to complete in order to access your file server from outside the local network.
FileZilla Server
Filezilla is a popular FTP client program, but they also have a server version that is freely available. It’s also fairly easy to setup with the defaults options left unchanged during install.
When installing, you’ll be asked to choose how you want to install FileZilla and it’s best to leave it so that it installs as a Windows service. You can also leave the port number with the default value. Click Next and then you’ll be asked how the server should be started. Unless you want to manually start it, the default behavior is to load automatically when the user logs in. Click Install and it should be finished within a few seconds.
A small little window will pop up that shows the basic information for the server. Check the Always connect to this server box if you don’t plan on creating any other FTP server on the same computer. Click OK and main interface will appear.
There are a few more steps to get a directory setup in FileZilla, but our friends over at HowToGeek have written a great article that walks you through the rest of the process for setting up FileZilla.
FreeNAS
The last product I want to mention is FreeNAS, which is just an awesome open source program for creating your own network-attached storage device. Even though FreeNAS can do a ton of other stuff, it’s basic goal it to make sharing files easier.
The only difference FreeNAS and the other two programs I mentioned above is that the former is actually a full operating system of its own. If you want to use FreeNAS, you will have to dedicate an entire machine for its use! Also, it does have certain system requirements that might prevent you from using it on your particular PC.
Anyway, if you have a spare machine laying around that you’ve never been able to find a use for, maybe now is the time to convert it into a streaming and sharing super NAS.
The folks over at MakeUseOf have written a comprehensive guide to installing and setting up FreeNAS just for sharing out files over the Internet. They also talk about how to setup dynamic DNS so you can access your the server from outside the local network.
Firewall & Port Forwarding
As mentioned earlier, to get any of these to work outside your home network, you’ll need to do up to three things:
1. Open the ports on the local Windows firewall for the PC (HFS and FileZilla)
2. Forward certain ports (FTP, WEB, etc) from your router to your PC
3. Set up your home server with dynamic DNS, so that it can be accessed via a URL rather than an IP address, which may change anytime.
The third option is optional as you can just lookup your external IP address and give that to the person who needs to access the server. However, if you don’t have a static IP address and most residential homes don’t, then the IP address can change at anytime. Usually, it’ll be the same for a couple of days so if that’s all the time you need to transfer a file, then don’t worry about option 3. If you don’t know what I’m talking about, check out my post that explains the difference between a static and dynamic IP address.
I’ve written a detailed post explaining port forwarding and how you are supposed to configure it. You can learn more about forwarding ports on your router by going to http://www.portforward.com/.
I’ve also written about dynamic DNS and how you can get yourself an easy to remember URL that will automatically point your public IP address even if it changes.
Hopefully, this will get you well on your way to setting up a file sharing server from home. It will take a bit of time and you’ll run into some hiccups along the way, but it’s totally doable for most folks. If you have any questions or run into issues you can’t solve, post a comment and we’ll try to help. Enjoy!