<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>WooDragon &#187; server</title> <atom:link href="http://iamwd.com/posts/tag/server/feed" rel="self" type="application/rss+xml" /><link>http://iamwd.com</link> <description>冷漠的站在阴影中观察过往的路人、妖、人妖</description> <lastBuildDate>Fri, 20 Jan 2012 01:58:50 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>CentOS 5.7下的OpenVPN配置笔记</title><link>http://iamwd.com/posts/install-openvpn-on-centos-57.html</link> <comments>http://iamwd.com/posts/install-openvpn-on-centos-57.html#comments</comments> <pubDate>Sun, 13 Nov 2011 15:08:12 +0000</pubDate> <dc:creator>WooDragon</dc:creator> <category><![CDATA[网络相关]]></category> <category><![CDATA[Internet]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[server]]></category> <category><![CDATA[VPN]]></category><guid isPermaLink="false">http://iamwd.com/?p=944</guid> <description><![CDATA[接到任务，写OpenVPN配置教程一篇，于是憋出来 安装包 rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum -y update yum -y install openvpn 服务配置 cd /etc/openvpn/ cp /usr/share/doc/openvpn-2.2.0/sample-config-files/server.conf . 注意：上面一行最后有个空格再一点儿 mkdir -p /etc/openvpn/easy-rsa/keys cd /etc/openvpn/easy-rsa cp -rf /usr/share/doc/openvpn-2.2.0/easy-rsa/2.0/* . 注意：上面一行最后有个空格再一点儿 chmod o+x,g+x clean-all chmod o+x,g+x build-* chmod o+x,g+x vars chmod o+x,g+x whichopensslcnf chmod o+x,g+x pkitool chmod o+x,g+x inherit-inter chmod o+x,g+x list-crl chmod o+x,g+x revoke-full chmod o+x,g+x [...]]]></description> <content:encoded><![CDATA[<p>接到任务，写OpenVPN配置教程一篇，于是憋出来</p><h2>安装包</h2><p><code>rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</p><p>yum -y update</p><p>yum -y install openvpn</code></p><h2>服务配置</h2><p><code>cd /etc/openvpn/</p><p>cp /usr/share/doc/openvpn-2.2.0/sample-config-files/server.conf .</code></p><p>注意：上面一行最后有个<span style="color: #ff0000;">空格再一点儿</span></p><p><code>mkdir -p /etc/openvpn/easy-rsa/keys</p><p>cd /etc/openvpn/easy-rsa</p><p>cp -rf /usr/share/doc/openvpn-2.2.0/easy-rsa/2.0/* .</code></p><p>注意：上面一行最后有个<span style="color: #ff0000;">空格再一点儿</span></p><p><code>chmod o+x,g+x clean-all</p><p>chmod o+x,g+x build-*</p><p>chmod o+x,g+x vars</p><p>chmod o+x,g+x whichopensslcnf</p><p>chmod o+x,g+x pkitool</p><p>chmod o+x,g+x inherit-inter</p><p>chmod o+x,g+x list-crl</p><p>chmod o+x,g+x revoke-full</p><p>chmod o+x,g+x sign-req</code></p><h2>编辑PKI配置</h2><p><code>vi /etc/openvpn/easy-rsa/vars</code></p><p>按page down键往下翻页，找到export KEY_SIZE=这行，用j和k定位行，h和l定位字符，把1024改成2048或者4096，推荐4096，如果没几个人用的话加密强度当然越高越好～</p><p>再定位到最后面，会看到类似下面这样的<br /> <code>export KEY_COUNTRY="CN"<br /> export KEY_PROVINCE="ZJ"<br /> export KEY_CITY="HZ"<br /> export KEY_ORG="iamwd.com"<br /> export KEY_EMAIL="w@iamwd.com"</code></p><p>把引号里的东西随便改一下，不改也没啥大不了的</p><p>按住shift再按两下z保存修改</p><h2>证书证书</h2><p><strong>1.CA证书</strong><br /> <code>. ./vars</code></p><p>注意：前面是<span style="color: #ff0000;">点儿空格再点儿</span></p><p><code>./clean-all</p><p>./build-ca</code></p><p>狂敲回车即可，也可以随便写点资料</p><p><strong>2.certificate for the server</strong></p><p><code>./build-key-server iamwd</code></p><p>iamwd就是服务器名，随便起，但记住，<span style="color: #ff0000;">后面要用到</span></p><p>狂敲回车直到Sign the certificate? [y/n]:</p><p>输入y然后回车</p><p>出来1 out of 1 certificate requests certified, commit? [y/n]</p><p>输入y然后回车</p><p><strong>3.生成DH验证文件</strong><br /> <code>./build-dh</code></p><p>让服务器飞一会儿，前面写KEY_SIZE=4096的估计会稍微长一点，但也就一分钟不到肯定好了，主要是XeHost的VPS比较给力</p><p><strong>4.为每个客户端生成证书</strong><br /> <code>./build-key WooDragon</code></p><p>WooDragon替换成需要的用户</p><p>一路回车到Sign the certificate? [y/n]:</p><p>按y回车</p><p>1 out of 1 certificate requests certified, commit? [y/n]</p><p>按y回车</p><p><strong>5.编辑服务配置文件</strong><br /> <code>vi /etc/openvpn/server.conf</code></p><p>(1).找到port一行，后面的1194改成53，53是个好端口，当然大家可以根据需要灵活调整</p><p>(2).找到ca ca.crt这行，ca.crt替换为/etc/openvpn/easy-rsa/keys/ca.crt</p><p>(3).cert这行后面的server.crt替换为/etc/openvpn/easy-rsa/keys/iamwd.crt</p><p>(4).key这行后面的server.key替换为/etc/openvpn/easy-rsa/keys/iamwd.key</p><p>注意上面两行的iamwd.crt和iamwd.key就是前面certificate for the server这一步骤中生成的，那边生成的东西就用在这里</p><p>(5).找到;push "redirect-gateway def1 bypass-dhcp"</p><p>去掉最前面的注释符号;</p><p>并且删除def1后面的bypass-dhcp</p><p>也就是将这行替换成</p><p>push "redirect-gateway def1"</p><p>(6).找到 ;push "dhcp-option DNS 208.67.222.222"以及;push "dhcp-option DNS 208.67.222.220"</p><p>替换为push "dhcp-option DNS 8.8.8.8"以及push "dhcp-option DNS 8.8.4.4"</p><p>同样是去掉前面的注释符号</p><p>其他默认就可以了，保存配置</p><h2>启动服务</h2><p><code>service openvpn start</code></p><p>如果遭遇启动失败的情况，可以在配置文件中加上一行log-append  openvpn.log</p><p>再尝试启动，然后到/etc/openvpn/检查openvpn.log文件来查看错误发生原因</p><p>最后执行一行</p><p><code>chkconfig --level 235 openvpn on</code></p><p>将openvpn加入启动项</p><h2>设置外网访问</h2><p><code>vi /etc/sysctl.conf</code></p><p>找到net.ipv4.ip_forward = 0</p><p>把0改成1</p><p><code>sysctl -p</code></p><p><code>iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 2.2.2.2</code></p><p>把2.2.2.2替换成你自己VPS的IP</p><p><code>/etc/init.d/iptables save</p><p>/etc/init.d/iptables restart</code></p><p>服务器端配置完成</p><p>客户端配置非常简单，不再详述</p><p>以上</p><p>参考</p><p><a href="http://nkush.blogspot.com/2011/10/installing-openvpn-22-on-centos-57.html">http://nkush.blogspot.com/2011/10/installing-openvpn-22-on-centos-57.html</a></p><p>BTW：混蛋，老外写文章也挺不靠谱啊，漏了好多个关键点没写，然后我也没想到，朋友提醒了才发现= =</p><p>&copy;2012 <a href="http://iamwd.com">WooDragon</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://iamwd.com/posts/install-openvpn-on-centos-57.html/feed</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>关于逃亡时如何确保网络通讯安全——IM篇</title><link>http://iamwd.com/posts/internet-communication-security-of-escaping.html</link> <comments>http://iamwd.com/posts/internet-communication-security-of-escaping.html#comments</comments> <pubDate>Tue, 06 Sep 2011 16:05:51 +0000</pubDate> <dc:creator>WooDragon</dc:creator> <category><![CDATA[安全相关]]></category> <category><![CDATA[Internet]]></category> <category><![CDATA[IT]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[server]]></category> <category><![CDATA[信息安全]]></category> <category><![CDATA[加密]]></category> <category><![CDATA[安全]]></category> <category><![CDATA[扯淡]]></category> <category><![CDATA[生存]]></category> <category><![CDATA[生活]]></category> <category><![CDATA[网络]]></category> <category><![CDATA[通讯]]></category><guid isPermaLink="false">http://iamwd.com/?p=728</guid> <description><![CDATA[本文面向使用Windows 7及XP的，计算机知识有限的用户（本文注重详尽的教程而非细节教学，具体原理请自行Google），对高级用户及其他操作系统用户仅供参考（用Linux的家伙自己都能搞定吧！）。悲催啊，昨天晚上喝多了，今儿还连夜赶这文章，残念……图片啥的就免了，排版能看就行吧…… 目的 逃亡、被通~缉、怀疑自己通讯被监控、高度机密内容、城市紧急状态、网络管制、私密内容、身份可能被仿冒等等，具备非常广泛的适用范围。 下面是正文，首先介绍本教程基于何种技术和方法确保即时通讯的传输安全及防止身份仿冒。 所涉技术及软件 1.通过数字证书及数字签名体系及生成非对称密钥来确保安全性，本教程使用开源的GnuPG来加密明文及认证使用者身份。GnuPG的介绍见维基百科，非对称加密的介绍 2.本文所述IM基于开源的XMPP标准实现即时通讯。 3.本文所涉端到端加密通讯载体的自建服务端使用ejabberd搭建。（非必须） 4.本文所涉端到端加密通讯载体的第三方服务端使用Google的Google talk服务。 5.本文所涉IM软件为开源的psi客户端。 非对称密钥的生成及管理 首先是Win7 安装及生成个人证书 1.到官网下载安装gpg4win，此工具为GnuPG官方网站推荐的Windows下工具套件，相当好用。（2.1.0版本在XP下有问题，我没有找到原因。GnuPG的官方网站为 gnupg.org） 2.安装它，完成后开始菜单会生成一个名为gpg4win的程序组文件夹，里面有一个图标似乎是女人脑袋的程序，名为Kleopatra，运行它，话说图标真的丑爆了。 3.点击左上角的File，在弹出窗口点击”Create a personal OpenPGP key pair”（不含引号），我们来生成一个证书。 Name当然填写你的大名,Email写你常用且安全的邮箱，推荐使用打开了两步验证的gmail。comment随便写，可以写一些备注。 点击Advanced setting，RSA右边的下拉菜单选中3072bits，下方的复选框选中Authentication，点击ok 点击Next后会弹出对话框要求输入证书口令（Enter passphrase），注意这是非常重要的，请一定将其设置的足够长、足够复杂、绝非常用、至少同时包含字母数字以及至少1个标点符号，且长度大于8位，ok以后会要求你确认密码，重复输入完毕后点击ok。 证书已经被生成了，最后一个步骤会问你是否需要备份你的证书（Make a backup of your key pair），你可以选择将其导出并备份，若需备份。建议使用7Zip软件将其加密打包（7Zip使用AES加密），放到互联网上的某个角落，然后销毁本地的备份文件。 接下来我们需要导出一份公钥，以便收件人能够确认你的身份且加密消息。你可以通过选中自己的证书上然后“点击右键选择Export Certificates”或者“按组合快捷键Ctrl+E”或者“点击工具栏中硕大的Export Certificates（未选中证书时该按钮为灰色不可选）”达成该目的。注意不要选择任何形式的“Export Secret Keys”，这是导出私钥而非公钥。 传递及导入证书 1.公钥的传递过程是有可能被劫持的，应当尽量选择安全性高或者不通过第三方的传递方法，例如使用U盘或者类似介质人肉传递。最低要求也得使用具备SSL   传输加密的Email，例如GMail（假如你信任Google的话，你们信不信我不知道，反正我是信了） 2.得到一份公钥文件以后，默认情况下应当是一个asc后缀的文件，其他格式也有可能，反正只管导入，Kleopatra的界面非常直观，直接在主界面找到“import certificates”点击它，接着选中需要导入的公钥文件，确认即可。 3.前期较为复杂的步骤均已完成，证书方面已经没有什么问题了，最后强调下，务必确保私钥及私钥口令的安全性，切记。 WindowsXP 由于gpg4win套件在XP上似乎未必能够正常工作，所以分开讲下XP下的安装方法，较Win7麻烦一些 首先在官方ftp服务器找到GnuPG本体的Windows安装包 ftp://ftp.gnupg.org/gcrypt/binary/ 目前最新版本为1.4.9（点击下载），接着在 ftp://ftp.gnupg.org/gcrypt/gpgee/ 下载最新版gpgee，目前最新版本为1.3.1 然后在 [...]]]></description> <content:encoded><![CDATA[<p>本文面向使用Windows 7及XP的，计算机知识有限的用户（本文注重详尽的教程而非细节教学，具体原理请自行Google），对高级用户及其他操作系统用户仅供参考（用Linux的家伙自己都能搞定吧！）。悲催啊，昨天晚上喝多了，今儿还连夜赶这文章，残念……图片啥的就免了，排版能看就行吧……</p><h2>目的</h2><p>逃亡、被通~缉、怀疑自己通讯被监控、高度机密内容、城市紧急状态、网络管制、私密内容、身份可能被仿冒等等，具备非常广泛的适用范围。</p><p>下面是正文，首先介绍本教程基于何种技术和方法确保即时通讯的传输安全及防止身份仿冒。</p><h2>所涉技术及软件</h2><blockquote><p>1.通过数字证书及数字签名体系及生成<span style="color: #ff0000;">非对称密钥</span>来确保安全性，本教程使用开源的GnuPG来加密明文及认证使用者身份。GnuPG的介绍见<a href="http://zh.wikipedia.org/wiki/GnuPG" target="_blank">维基百科</a>，<a href="http://zh.wikipedia.org/wiki/RSA%E5%8A%A0%E5%AF%86%E6%BC%94%E7%AE%97%E6%B3%95" target="_blank">非对称加密的介绍</a></p><p>2.本文所述IM基于开源的XMPP标准实现即时通讯。</p><p>3.本文所涉端到端加密通讯载体的自建服务端使用ejabberd搭建。（非必须）</p><p>4.本文所涉端到端加密通讯载体的第三方服务端使用Google的Google talk服务。</p><p>5.本文所涉IM软件为开源的psi客户端。</p></blockquote><div class="warning shortcodestyle"></p><p>请注意，本文<span style="color: #ff0000;">无法阻止本地木马</span>或者键盘记录工具对信息的窃取行为，所以务必定期认真检查计算机本地环境的安全状况。</p><p>本文<span style="color: #ff0000;">无法隐藏或伪装终端IP地址</span>，若需反追踪切记配合<span style="color: #ff0000;">跨国</span>代理服务器！</p><p>本文并非万能，最终安全性也<span style="color: #ff0000;">取决于使用者的安全意识</span>，请妥善保管证书私钥以确定仅自己能够接触或者他人难以触及，否则仍然有被仿冒的可能。</p><p></div><h2>非对称密钥的生成及管理</h2><h2><span style="font-weight: bold;">首先是Win7</span></h2><p><strong>安装及生成个人证书</strong></p><p>1.到官网下载安装<a href="http://www.gpg4win.org/download.html" target="_blank">gpg4win</a>，此工具为GnuPG官方网站推荐的Windows下工具套件，相当好用。（2.1.0版本在XP下有问题，我没有找到原因。GnuPG的官方网站为 <a href="http://www.gnupg.org/" target="_blank">gnupg.org</a>）</p><p>2.安装它，完成后开始菜单会生成一个名为gpg4win的程序组文件夹，里面有一个图标似乎是女人脑袋的程序，名为Kleopatra，运行它，话说图标真的丑爆了。</p><p>3.点击左上角的File，在弹出窗口点击”Create a personal OpenPGP key pair”（不含引号），我们来生成一个证书。</p><p>Name当然填写你的大名,Email写你常用且安全的邮箱，推荐使用打开了两步验证的gmail。comment随便写，可以写一些备注。</p><p>点击Advanced setting，RSA右边的下拉菜单选中<span style="color: #ff0000;">3072bits</span>，下方的复选框选中Authentication，点击ok</p><p>点击Next后会弹出对话框要求输入证书口令（Enter passphrase），注意这是非常重要的，请一定将其设置的<span style="color: #ff0000;">足够长、足够复杂、绝非常用</span>、至少同时包含字母数字以及至少1个标点符号，且长度大于8位，ok以后会要求你确认密码，重复输入完毕后点击ok。</p><p>证书已经被生成了，最后一个步骤会问你是否需要备份你的证书（Make a backup of your key pair），你可以选择将其导出并备份，若需备份。建议使用7Zip软件将其加密打包（7Zip使用AES加密），放到互联网上的某个角落，然后<span style="color: #ff0000;">销毁</span>本地的备份文件。</p><p>接下来我们需要<span style="color: #ff0000;">导出一份公钥</span>，以便收件人能够确认你的身份且加密消息。你可以通过选中自己的证书上然后“点击右键选择Export Certificates”或者“按组合快捷键Ctrl+E”或者“点击工具栏中硕大的Export Certificates（未选中证书时该按钮为灰色不可选）”达成该目的。注意不要选择任何形式的“Export Secret Keys”，这是导出私钥而非公钥。</p><p><strong>传递及导入证书</strong></p><p>1.公钥的传递过程是有可能被劫持的，应当尽量选择安全性高或者<span style="color: #ff0000;">不通过第三方</span>的传递方法，例如使用U盘或者类似介质人肉传递。最低要求也得使用具备SSL   传输加密的Email，例如GMail（假如你信任Google的话，你们信不信我不知道，反正我是信了）</p><p>2.得到一份公钥文件以后，默认情况下应当是一个asc后缀的文件，其他格式也有可能，反正只管导入，Kleopatra的界面非常直观，直接在主界面找到“import certificates”点击它，接着选中需要导入的公钥文件，确认即可。</p><p>3.前期较为复杂的步骤均已完成，证书方面已经没有什么问题了，最后强调下，务必<span style="color: #ff0000;">确保私钥及私钥口令的安全性</span>，切记。</p><h2><span style="font-weight: bold;">WindowsXP</span></h2><p>由于gpg4win套件在XP上似乎未必能够正常工作，所以分开讲下XP下的安装方法，较Win7麻烦一些</p><p>首先在官方ftp服务器找到GnuPG本体的Windows安装包 <a href="ftp://ftp.gnupg.org/gcrypt/binary/">ftp://ftp.gnupg.org/gcrypt/binary/</a> 目前最新版本为<a href="ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.9.exe" target="_blank">1.4.9</a>（点击下载），接着在 <a href="ftp://ftp.gnupg.org/gcrypt/gpgee/">ftp://ftp.gnupg.org/gcrypt/gpgee/</a> 下载最新版gpgee，目前最新版本为<a href="ftp://ftp.gnupg.org/gcrypt/gpgee/GPGee-1.3.1.zip" target="_blank">1.3.1</a></p><p>然后在 <a href="http://www.tech-faq.com/gnupg-shell.html">http://www.tech-faq.com/gnupg-shell.html</a> 下载Windows下的gnupg shell，目前版本为1.0，<a href="http://www.tech-faq.com/gnupg-shell/gnupgshell-1.0.0.windows.zip" target="_blank">点击下载</a></p><p>首先安装刚才下载的gnupg-w32cli-1.4.9.exe,接着解压并安装gpgee，最后安装gnupg shell，一上来就会让你创建证书，过程参考前面的win7，有空我会找到XP的电脑补齐这段。</p><h2><span style="font-weight: bold;">实现端到端加密通讯</span></h2><p>1.先到psi官网下载它 <a href="http://psi-im.org/download/">http://psi-im.org/download/</a> （目前最新版本为0.14）</p><p>安装包 <a title="http://downloads.sourceforge.net/psi/psi-0.14-win-setup.exe" href="http://downloads.sourceforge.net/psi/psi-0.14-win-setup.exe">http://downloads.sourceforge.net/psi/psi-0.14-win-setup.exe</a></p><p>免安装压缩包 <a title="http://downloads.sourceforge.net/psi/psi-0.14-win32.zip" href="http://downloads.sourceforge.net/psi/psi-0.14-win32.zip">http://downloads.sourceforge.net/psi/psi-0.14-win32.zip</a></p><p>繁体中文语言包 <a title="http://psi-im.org/download/lang/psi_zh_TW.qm" href="http://psi-im.org/download/lang/psi_zh_TW.qm">http://psi-im.org/download/lang/psi_zh_TW.qm</a></p><p>（注：官方并没有简体中文语言包，虽然能找到简体中文版，但出于安全考虑，强烈建议到官网下载！）</p><p>2.解压/安装好psi以后，将繁体中文语言包复制到程序安装目录</p><p>3.运行psi.exe （鸟语的话关掉再打开）</p><p>4.点击左上角的“一般”，点击“帳號設定”，点击“增加”，“名稱”右边写希望显示的名称。</p><p>下一个页面的Jabber ID填写你的帐号，ejabberd服务端为用户名@域名，Google talk帐号为用户名@gmail.com，“密碼”当然填写密码。</p><p>下方的复选框全部勾选，不过最后一个“記錄訊息歷史”可以酌情勾选。</p><p>切换到“細項”选项卡，在OpenGPG项中点选“<span style="color: #ff0000;">選擇鑰匙</span>”，勾选你前面生成的那个RSA密钥。</p><p>切换到“連線”选项卡，“<span style="color: #ff0000;">加密連線</span>”后面的下拉菜单中选中“總是”。</p><p>点击下面的save，帐号设定完毕。</p><p>5.再次点选界面左上角的“一般”，点击“選項”，在左边找到“雜項”，右边有个“检查拼字”，确保取消勾选，若选中的话聊天的时候中文下面也会有一堆蛋疼的红色波浪线……</p><p>点击ok</p><p>6.点击上方的“狀態”，点击“線上”，中间可能弹出窗口要求输入RSA证书口令，登录完成。假设该帐号显示名为gmail的话，右边会有一把黄色小锁，代表你可以使用端到端加密功能。</p><p>7.打开一个希望加密的会话，这时上方的锁是灰色的，表示本次会话<span style="color: #ff0000;">未被加密</span>（只是没有端到端加密，刚才已经为Google talk开启了TLS加密），点击锁，它会变成黄色，代表会话将被加密，这时你再输入信息并发送会提示你选择需要使用的密钥（未点击小锁时可以随便发，没有任何障碍），注意你们双方需要已经完成前文所述的公钥交换，选择交流目标的公钥并确定，于是一条加密的消息就发出去了，对面也会收到实时解码的明文。</p><p>整个过程中连Google talk服务器也无法得知你们的交谈内容，再加上Google本身的TLS加密传输，在终端安全没有问题的情况下窃听你们的交流内容估计只有掌握了成熟的量子计算机科技的<span style="color: #ff0000;">外星人</span>能够实现了。</p><p>出于进一步的安全考量，我还自行搭建了ejabberd服务器做紧急通讯用（也许永远用不到，也希望永远用不到……），没有安装除离线消息以外的任何消息记录模块，具体搭建过程等有空会写一下的……貌似这个的教程非常少啊，我啃了三天三夜的鸟语文档lol鸟语苦逼泪流满面……</p><p>好了，总算码完了，脑子一片混乱写的东西就甭指望多好了，反正其实主要还是写给朋友看的，睡觉啊啊啊啊……</p><p>&copy;2012 <a href="http://iamwd.com">WooDragon</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://iamwd.com/posts/internet-communication-security-of-escaping.html/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>利用完整的定期备份数据实现简单的CDN方案</title><link>http://iamwd.com/posts/backup-all-data-regular-for-simple-cdn-system.html</link> <comments>http://iamwd.com/posts/backup-all-data-regular-for-simple-cdn-system.html#comments</comments> <pubDate>Sat, 11 Dec 2010 13:50:07 +0000</pubDate> <dc:creator>WooDragon</dc:creator> <category><![CDATA[网络相关]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[CDN]]></category> <category><![CDATA[Data]]></category> <category><![CDATA[Host]]></category> <category><![CDATA[Internet]]></category> <category><![CDATA[server]]></category> <category><![CDATA[VPS]]></category> <category><![CDATA[安全]]></category><guid isPermaLink="false">http://iamwd.com/?p=610</guid> <description><![CDATA[&#160;&#160;&#160;&#160;&#160; 感觉自己的blog上面基本上没什么和学的专业相关的东西，主要是感觉很多东西Google一下就有了，再写一遍的意义不大，好不容易有点跟网络搭边的东东可以写了~ &#160;&#160;&#160;&#160;&#160; 我的服务器（VPS）上所有数据都会定期同步到另外的服务器上，目前所有数据都是一式三份的，主服务器、两台备份主机。 &#160;&#160;&#160;&#160;&#160; 于是另外两台东西上面完整的存储着和主服务器上一模一样的数据，很浪费呐，那么既然有完全一样的数据，不低的备份频率，那么做CDN岂不是很方便？ &#160;&#160;&#160;&#160;&#160; 所以这篇蛋疼的CDN方案就出来了，至于为什么说蛋疼…… &#160;&#160;&#160;&#160;&#160; 没什么高深的技术，非常简单。 环境简介 两台或者以上的服务器，有root权限，有shell 服务器分布于不同地区和线路。我的两个在Fremont，一个在New york。 所有服务器操作系统基于Linux（我的是centos 5.4） 所有服务器安装Nginx，我的版本为0.8.53 具有宕机检测、智能解析特性的DNS服务器，自己搭或者DNSPod最低档VIP（120元每年）均可以满足要求。 一个专用于CDN的域名，例如cdn.iamwd.com 部署过程 数据同步： &#160;&#160;&#160;&#160;&#160; 以下内容主服务器简称为主机，备份服务器/CDN节点简称为备机。 &#160;&#160;&#160;&#160;&#160; 在主机和备机之间部署rsync，因为托管在我的服务器上的应用没有对实时性很高的东西（如果对实时性有要求，那么rsync方案是肯定不可行的，建议使用反向代理以及缓存实现），所以简单的将rsync的同步间隔调整至半小时一次即可。 &#160;&#160;&#160;&#160;&#160; 具体对rsync的部署过程不做详述，建议参考……呃，我找不到当初我参考的文章了，不胡乱推荐，自行Google吧~（读者吐槽：这货是何其懒，加个链接都懒得加） &#160;&#160;&#160;&#160;&#160; 同步的内容至少包括需要部署CDN的网站目录，从这里开始以本站（iamwd.com）为例。我备份的是整个网站根目录，对于采用lnmp包搭建服务器的童鞋们来说就是“/home/wwwroot”目录。 &#160;&#160;&#160;&#160;&#160; 我将同步时间间隔设定为半小时一次，在备机的“/etc/crontab”这个文件中设定间隔，方法rsync教程中会提到。 配置CDN节点： &#160;&#160;&#160;&#160;&#160; 在备机上配置Nginx，将cdn.iamwd.com指向rsync同步的目标目录。 &#160;&#160;&#160;&#160;&#160; 简单示例，根据需要修改增减。 server { listen 80; server_name cdn.iamwd.com; &#160;&#160;&#160; location ~ .*.(wma&#124;wmv&#124;asf&#124;mp3&#124;zip&#124;rar&#124;jpg&#124;jpeg&#124;gif&#124;png&#124;swf&#124;flv&#124;css&#124;js)$ { &#160;&#160;&#160; root /home/wwwroot/iamwd.com/; &#160;&#160;&#160; } &#160;&#160;&#160; location / [...]]]></description> <content:encoded><![CDATA[<p>&#160;&#160;&#160;&#160;&#160; 感觉自己的blog上面基本上没什么和学的专业相关的东西，主要是感觉很多东西Google一下就有了，再写一遍的意义不大，好不容易有点跟网络搭边的东东可以写了~</p><p>&#160;&#160;&#160;&#160;&#160; 我的服务器（<a href="http://baike.baidu.com/view/698769.htm" target="_blank">VPS</a>）上所有数据都会定期同步到另外的服务器上，目前所有数据都是<font color="#ff0000">一式三份</font>的，主服务器、两台备份主机。</p><p>&#160;&#160;&#160;&#160;&#160; 于是另外两台东西上面完整的存储着和主服务器上一模一样的数据，很浪费呐，那么既然有完全一样的数据，不低的备份频率，那么做CDN岂不是很方便？</p><p>&#160;&#160;&#160;&#160;&#160; 所以这篇蛋疼的<a href="http://zh.wikipedia.org/zh/CDN" target="_blank">CDN</a>方案就出来了，至于为什么说蛋疼……</p><p><span id="more-610"></span><p>&#160;&#160;&#160;&#160;&#160; 没什么高深的技术，非常简单。</p><h2><font style="font-weight: bold">环境简介</font></h2><ol><li>两台或者以上的服务器，有root权限，有shell</li><li>服务器分布于不同地区和线路。我的两个在Fremont，一个在New york。</li><li>所有服务器操作系统基于Linux（我的是centos 5.4）</li><li>所有服务器安装<a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAkQFjAA&amp;url=http%3A%2F%2Fzh.wikipedia.org%2Fwiki%2FNginx&amp;ei=BNs5S6buNYSsswPP_fi8BA&amp;usg=AFQjCNFWxMkw2SQamSHr3dHHDTp9tK_umA&amp;sig2=EtFgAJMw8aXrhmHxY1l1gw" target="_blank">Nginx</a>，我的版本为0.8.53</li><li>具有宕机检测、智能解析特性的DNS服务器，自己搭或者DNSPod最低档VIP（120元每年）均可以满足要求。</li><li>一个专用于CDN的域名，例如cdn.iamwd.com</li></ol><h2><font style="font-weight: bold">部署过程</font></h2><h3><font style="font-weight: bold">数据同步：</font></h3><p>&#160;&#160;&#160;&#160;&#160; 以下内容主服务器简称为主机，备份服务器/CDN节点简称为备机。</p><p>&#160;&#160;&#160;&#160;&#160; 在主机和备机之间部署rsync，因为托管在我的服务器上的应用没有对实时性很高的东西（如果对实时性有要求，那么rsync方案是肯定不可行的，建议使用反向代理以及缓存实现），所以简单的将rsync的同步间隔调整至半小时一次即可。</p><p><img src="http://img.iamwd.com/_TkfVEhIEr7A/TQOhcKFMVVI/AAAAAAAAWZ0/SD_aOdNpEXg/s570/datarecovery%5B1%5D.jpg" /></p><p>&#160;&#160;&#160;&#160;&#160; 具体对rsync的部署过程不做详述，建议参考……呃，我找不到当初我参考的文章了，不胡乱推荐，自行Google吧~（读者吐槽：这货是何其懒，加个链接都懒得加）</p><p>&#160;&#160;&#160;&#160;&#160; 同步的内容至少包括需要部署CDN的网站目录，从这里开始以本站（<a href="http://iamwd.com" target="_blank">iamwd.com</a>）为例。我备份的是整个网站根目录，对于采用<a href="http://lnmp.org/" target="_blank">lnmp</a>包搭建服务器的童鞋们来说就是“/home/wwwroot”目录。</p><p>&#160;&#160;&#160;&#160;&#160; 我将同步时间间隔设定为半小时一次，在备机的“/etc/crontab”这个文件中设定间隔，方法rsync教程中会提到。</p><h3><font style="font-weight: bold">配置CDN节点</font>：</h3><p>&#160;&#160;&#160;&#160;&#160; 在备机上配置Nginx，将cdn.iamwd.com指向rsync同步的目标目录。</p><p>&#160;&#160;&#160;&#160;&#160; 简单示例，根据需要修改增减。</p><p><code>server { </code> <br /><code>listen 80; </code> <br /><code>server_name cdn.iamwd.com; </code> <br /><code>&#160;&#160;&#160; location ~ .*.(wma|wmv|asf|mp3|zip|rar|jpg|jpeg|gif|png|swf|flv|css|js)$ { </code> <br /><code>&#160;&#160;&#160; root /home/wwwroot/iamwd.com/; </code> <br /><code>&#160;&#160;&#160; } </code> <br /><code>&#160;&#160;&#160; location / { </code> <br /><code>&#160;&#160;&#160; rewrite ^/(.*) http://iamwd.com$1 permanent; </code> <br /><code>&#160;&#160;&#160; } </code> <br /><code>} </code></p><h3><font style="font-weight: bold">配置DNS：</font></h3><p>&#160;&#160;&#160;&#160;&#160; 以<a href="http://dnspod.com" target="_blank">DNSPod</a>为例，购买120元的vip后，进入控制面板为cdn.iamwd.com指定A记录，分别指向主服务器和备机。</p><p>&#160;&#160;&#160;&#160;&#160; 不同机房的针对不同线路，关于机房对什么线路更友好，可以通过<a title="http://www.webkaka.com/Ping.aspx" href="http://www.webkaka.com/">http://www.webkaka.com/</a>进行判断。</p><p>&#160;&#160;&#160;&#160;&#160; 例如我的<a href="http://www.linode.com/">Linode</a>主机在Fremont机房，He.net线路，电信速度相当给力，所以将其指定为默认解析IP，还有一个VPS在相同的机房，所以放弃不用，当然如果将其作为热备也是可以的。另一个纽约机房的VPS测试表明对联通线路较为友好，所以将其指定为联通访问的解析地址。</p><p>&#160;&#160;&#160;&#160;&#160; 本文最开始说到了这事情很蛋疼，聪明的人看到这里应该发现了——两个CDN节点都在国外……过段时间可能会有国内的主机入手，到时候才会体现出CDN的作用来~</p><p>&#160;&#160;&#160;&#160;&#160; 设置完毕以后对cdn.iamwd.com设置宕机检测，这样当其中一个服务器挂掉的时候会将解析结果指向正常的服务器，切换过程通常在10分钟左右（主要是地方DNS服务器的解析生效时间）。</p><h3><font style="font-weight: bold">配置网站：</font></h3><p>&#160;&#160;&#160;&#160;&#160; 这一步基本不用动脑子，将网站模板/主题中所有静态资源的链接改成cdn.iamwd.com即可。</p><p>&#160;&#160;&#160;&#160;&#160; 对于WordPress来说，可以使用WP Super Cache实现，在CDN菜单中设置，把原本的iamwd.com改为cdn.iamwd.com即可。</p><p>&#160;&#160;&#160;&#160;&#160; 顺便说一句，一个叫W3 Total Cache的全能优化插件很坑爹，极其不推荐使用，它经常占用大量的CPU资源，会连续几小时吃掉Linode这样的高性能VPS超过40%的CPU资源，而且我还只是开启了很少的模块。</p><p>&#160;&#160;&#160;&#160;&#160; 如果想将该域名也能用于其他站的CDN，很简单，修改nginx设置，把根目录改成wwwroot即可，其他站的静态资源丢到该目录中。</p><p>咳咳，话说这是我写的最木有诚意的文章之一了，能省的部分都给省了= =</p><p>&copy;2012 <a href="http://iamwd.com">WooDragon</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://iamwd.com/posts/backup-all-data-regular-for-simple-cdn-system.html/feed</wfw:commentRss> <slash:comments>18</slash:comments> </item> <item><title>轻松搭建专业级FTP文件共享服务器</title><link>http://iamwd.com/posts/easy-to-build-pro-ftp-files-share-server.html</link> <comments>http://iamwd.com/posts/easy-to-build-pro-ftp-files-share-server.html#comments</comments> <pubDate>Fri, 10 Jul 2009 16:40:51 +0000</pubDate> <dc:creator>WooDragon</dc:creator> <category><![CDATA[软件应用]]></category> <category><![CDATA[FTP]]></category> <category><![CDATA[server]]></category> <category><![CDATA[教程]]></category><guid isPermaLink="false">http://iamwd.com/http:/iamwd.com/page/</guid> <description><![CDATA[最近总是遇到一些很郁闷的情况，不得不自己搭建临时的FTP服务器，而作为完美主义者的我就不免弄出个比较专业的了，然后顺手就假设了应用环境写出这篇如何利用Serv-U搭建家庭用广域文件共享服务器的文章来。有人看到这么长的文章估计立马想跑路了，俺也没啥想法，走吧，反正有需要的还是会看的~一.什么是FTP文件共享服务器？了解这玩意之前先让我们看看FTP是什么意思，FTP（File Transfer Protocol），是文件传输协议的简称。用于Internet上文件的双向传输。简单的说，FTP用来协调服务端和客户端互相扔鸡蛋的行为，什么时候该服务端扔，什么时候该客户端扔，什么时候该扔几号鸡蛋等……二.为什么要搭建FTP文件共享服务器？在这里可以看出，我们需要的是“共享服务器”，也就是说，它的主要任务是共享。当然，它的本来意义并不是如此（差不多）。]]></description> <content:encoded><![CDATA[<div style="padding-bottom: 0px; line-height: normal; background-color: #ffffff; margin: 6px; min-height: 1100px; padding-left: 0px; padding-right: 0px; font-family: verdana; font-size: 10pt; padding-top: 0px"><div style="margin-top: 0px; margin-bottom: 0px"><div style="margin-top: 6px; margin-right: 6px; margin-bottom: 6px; margin-left: 6px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Verdana; font-size: 10pt; background-color: rgb(255, 255, 255); min-height: 1100px; counter-reset: __goog_page__ 0; line-height: normal; "><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">最近总是遇到一些很郁闷的情况，不得不自己搭建临时的FTP服务器，而作为完美主义者的我就不免弄出个比较专业的了，然后顺手就假设了应用环境写出这篇如何利用Serv-U搭建家庭用广域文件共享服务器的文章来。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">有人看到这么长的文章估计立马想跑路了，俺也没啥想法，走吧，反正有需要的还是会看的~&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><p><span id="more-879"></span></p><h2 style="font-size: 14pt; "><span style="background-color: rgb(147, 196, 125); "><span style="font-weight: normal; ">一.什么是FTP文件共享服务器？</span></span></h2><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;了解这玩意之前先让我们看看FTP是什么意思，<b>FTP（File Transfer Protocol）</b>，是文件传输协议的简称。用于Internet上文件的双向传输。简单的说，FTP用来协调服务端和客户端互相扔鸡蛋的行为，什么时候该服务端扔，什么时候该客户端扔，什么时候该扔几号鸡蛋等&hellip;&hellip;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h2 style="font-size: 14pt; "><span style="background-color: rgb(147, 196, 125); "><span style="font-weight: normal; ">二.为什么要搭建FTP文件共享服务器？</span></span></h2><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;在这里可以看出，我们需要的是&ldquo;共享服务器&rdquo;，也就是说，它的<b>主要任务是共享</b>。当然，它的本来意义并不是如此（差不多）。 &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;可能有人要说，这么古老的东西，要来干嘛？现在多好，有<a id="lau4" title="点击查看含义" target="_blank" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/%E5%B1%80%E5%9F%9F%E7%BD%91"><span style="text-decoration: none; "><b>局域网</b></span></a>，有QQ文件传输，有<a id="lu:s" title="点击查看含义" target="_blank" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/%E7%BD%91%E7%BB%9C%E7%A1%AC%E7%9B%98"><span style="text-decoration: none; "><b>网络硬盘</b></span></a>等等乱七八糟的共享手段，这个还要跑上去自己下载的东西，速度也不快吧！&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;那么让我们来看看用这古老玩意的理由：</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp;&nbsp;&nbsp;1.连接方式多样化。</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<img style="width: 599px; height: 119px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_120gmpq8j5d_b" /></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;需要说明的是，这里的其他包括迅雷，<a id="y654" title="点击查看详解" target="_blank" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/1411569.htm"><span style="text-decoration: none; "><b>命令行</b></span></a>等方式&hellip;&hellip;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;2.安全性高</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;FTP作为非常古老的协议，是非常、极其成熟的，其安全性不言而喻。 &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;灵活的用户、群组、域权限配置绝对能够应付各种极端状况，在确保应用需求的情况下保证强大的安全性。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;甚至能够支持<a id="mi84" target="_blank" title="SSL" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/SSL"><b>SSL</b></a>和<a id="tcyt" target="_blank" title="SSH" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/SSH"><span style="text-decoration: none; "><b>SSH</b></span></a>的加密传输。当然，作为一台文件共享服务器，我们并不需要用到&hellip;&hellip;&nbsp;&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;另一个隐形的好处就是，你再也不必冒着中毒的风险拿着U盘拷贝东西了！让对方上传即可。&nbsp;&nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_121g978rs32_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 426.667px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_121g978rs32_b" /></a></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;至少据我所知，除了FTP程序本身的漏洞，和密码猜解，没有什么手段能够完全控制FTP服务器。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;3.定制能力强大</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;作为一个优秀的FTP服务器，它能够定制几乎一切，小到是否显示文件快捷方式的指向目标和每个IP的上传/下载速度。大到哪个IP在哪个时间用哪个账户登录了你的服务器&hellip;&hellip;无所不包。 &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;4.建立维护便捷</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<b><font size="2">建立FTP服务器的便捷性：</font></b></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;虽然和局域网相比还是比较复杂，但是最最快的组建步骤仅仅需要&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;下载并安装服务端Serv-U</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;按向导走过两三个非常傻瓜的流程</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;用资源管理器或者网页浏览器访问，在IP前加上FTP://</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; "><div id="e:l6" style="margin-top: 0px; margin-bottom: 0px; text-align: left; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<img style="width: 640px; height: 479.861px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_122gzn9c6c2_b" /></div></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;仅此而已&hellip;&hellip;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<b><font size="2">维护FTP服务器的便捷性：</font></b></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;事实上，FTP服务器几乎没有什么值得维护的地方，当你建立好一个FTP服务器以后，就可以甩手不管了，需要做的只有以下几点（并且几乎全部都是选做的）：&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1.定时清理指定的上传目录，分门别类的整理安放或者删除。其实就是日常的磁盘内容整理而已。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;2.整理服务器的权限分配，建立或修改群组/用户的读写权限。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;3.保持作为服务器的电脑散热状况良好。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;4.检查并清理服务器的日志，看看有没有什么讨厌的家伙不请自来，对长期骚扰服务器的讨厌鬼实施永久的IP屏蔽。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;5.定时重启一下服务器，给系统打打补丁，保持系统稳定快速运行。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;呃，也许检查电脑是否沦为了<a id="gdxh" title="点击查看含义" target="_blank" href="http://www.hudong.com/wiki/%E8%82%89%E9%B8%A1[%E7%94%B5%E8%84%91]"><span style="text-decoration: none; "><b>肉鸡</b></span></a>也算是一条，不过这并不在本文的探讨范围内&hellip;&hellip;</div><p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</p><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;5.高速高效高适应性</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<font size="2"><b>高速：</b></font></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;虽然大部分我们能够接触的FTP服务器似乎并不那么快速，但是那是因为建立和维护者必须考虑到同时有许多人下载/上传东西的时候整体的速度，所以不得不对单IP以及服务器整体的速度做出限制。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;要知道，那些我们熟悉的FTP资源可是同时有成百上千的人在使用的！&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;我们后面也即将做类似的限制。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;作为并非那么多人使用的小范围共享服务器，我们所要做的限制肯定不会那么严格，总体来讲，速度至少会比QQ文件传输和网络硬盘快的多！注意，是快得多！&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<b><font size="2">高效：</font></b></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;高速自然催生高效，虽然那并不是绝对的相等，但不可否认的是，当远在异地的时候缺少某个文件带来的麻烦将不再存在&mdash;&mdash;你可以让朋友或者别的什么人帮你上传到FTP，或者你干脆本来就保存在那上面&hellip;&hellip;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;同时，相比原始的用U盘交换文件，这玩意简直就是福音&hellip;&hellip;至少你不用回家找东西了。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<a id="s7iz" target="_blank" title="查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/NAS"><span style="text-decoration: none; "><b>NAS</b></span></a>看宣传似乎比传统古老的FTP好上不知几倍，可要知道，一台功耗差不多的节能小电脑，价格只是同性能级别<a id="t4rg" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/NAS"><span style="text-decoration: none; "><b>NAS</b></span></a>的1/2甚至更少！&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</p><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;再者，<a id="bovy" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/NAS"><b>NAS</b></a>是相当精贵的东西，虽然有着巨大容量，<a id="ag4y" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/RAID"><b>RAID</b></a>等稀奇古怪有用没用的功能&hellip;&hellip;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;可是，咱们只是需要一个文件共享空间，1TB，2TB的空间，有意义么？又不是存放特别重要的数据（况且除了FTP上面的，本机的原始件谁会传完就删呢？），需要用到独立磁盘冗余阵列这种一听就知道灰常NB的技术么？&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;我认为没必要。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;用最少的投入，最低的能耗，换取相当方便的文件存储和共享空间，我认为这才是非常划算的买卖。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<b><font size="2">高适应性：</font></b></p><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;这家伙不挑食，FTP服务器可以在几乎任何系统上搭建：</p></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Windows系列，包括从98到最新的7和2008 RC2 （95我不清楚，虽然我觉得应该可以，但是不肯定，希望牛人指教！）&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a id="q1g4" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/Linux">Linux</a>内核的各种发行版。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a id="dfdl" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/Unix">Unix</a>内核，Sun的<a id="r7s4" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/Solaris">Solaris</a>，甚至<a id="wbb6" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/Mac%20OS">Mac OS</a>等等，都具有搭建FTP虚拟服务器的能力。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;不过以上内容纯属炫耀俺知道的多，因为咱们只是要在Windows平台下搭建FTP而已&hellip;&hellip;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><h2 style="font-size: 14pt; "><span style="background-color: rgb(106, 168, 79); "><span style="font-weight: normal; ">三.需要些什么？</span></span></h2><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;1.一台电脑。</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;不需要很高的配置，但是低功耗是必要的，<a id="xyuf" target="_blank" title="点击查看详解" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/Intel+Atom%E5%A4%84%E7%90%86%E5%99%A8"><b>Atom</b></a>核心的便携式笔记本、迷你台式机都是高优先选择项，当然，这样做似乎性价比相对低了一些&hellip;&hellip;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;所以，我个人建议单独配置一台专用服务器。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;处理器使用AMD或者Intel以节能为宣传口号的低价处理器，比如AMD系列编号后带有字母e的产品，或者Intel产品中和E2180同等价位的产品，他们常常兼顾了低功耗和低成本的特点。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&mdash;&mdash;有条件和动手能力的可以尝试卸下处理器风扇，使用全铝或纯铜散热片散热，这样可以达到零噪声的效果！ &nbsp; &nbsp; &nbsp; &nbsp;</div><p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</p><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;显卡是不能要的，主板最好选用集成显示核心性能很差的老一代产品，虽然就别的方面看，似乎运作效率和功耗都比新工艺新制程的要不理想，可是新的集成显示核心这一个玩意就可以让功耗超出预期。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;内存1G足矣。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;硬盘按需配置，我认为最好配置单碟硬盘，希捷500G的.12系列是不错的选择，或者西数的320G绿盘。原因是单碟的功耗小，噪音小，速度快。注意，没有必要购置企业级硬盘！&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;光驱踢开，局域网ghost或者U盘/移动硬盘安装系统才是我们需要的。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;电源是个比较严峻的问题。要求如下：</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1.具有<a id="s4f-" target="_blank" title="80Plus" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/1521443.htm"><b>80Plus</b></a>铜牌以上。通过至少一个国家级的安规标准和电磁兼容性测试。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;2.总瓦数不得高于250W。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;3.体积不得大于<a id="dxta" target="_blank" title="MicroATX" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/79759.html?tp=0_11"><b>MicroATX</b></a>板型机箱搭配的电源。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;4.安全保护措施齐备，过流、过压、输入欠压、过热保护等。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&mdash;&mdash;普通台机的低瓦数电源通常低价但是<a id="wnpm" target="_blank" title="转换效率" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/73337.html?tp=0_01"><b>转换效率</b></a>不佳。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&mdash;&mdash;<a id="x2z3" target="_blank" title="刀片" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/1615807.htm"><b>刀片</b></a>服务器电源体积小，转换效率高但是噪声巨大。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&mdash;&mdash;大型服务器电源的体积过大，价格不菲，况且少见低瓦数产品。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&mdash;&mdash;Mini主板的电源似乎不错，但是挑选余地小，好产品难寻。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;我认为能找着好的小机箱电源当然不错，如果是我的话，就会购买1U刀片机电源，拆开改造散热系统，做成开放式散热结构，利用一个14CM的超大风扇配合大面积铝散热片给整个机箱散热。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;这样一来总投资约1100元（或许更低，如果在电源上妥协的话），别问我是怎么得出这个价格的，反正我买的话就是这个价格。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_130gnc4q77v_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 365px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_130gnc4q77v_b" /></a><br /> &nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;2.微软的操作系统。</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;如果想看非Windows下的，那就不用接着看了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;服务器版本为佳，比如2003、2008。我用的是2008桌面修改版，但是操作没有差异。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;建议最低也得XP或者以上。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;3.Serv-U 8.0.0.7 服务端安装程序。</h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;老版本差异不是很大。甚至有人说版本6的稳定性最好，但是我对其安全性不抱期望，毕竟非常老了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h2 style="font-size: 14pt; "><span style="font-weight: normal; "><span style="background-color: rgb(106, 168, 79); ">四.开始动手！</span></span></h2><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">1.安装Serv-U</span><span style="font-weight: normal; "><font size="2">，安装过程不再叙述。</font></span></h3><div style="margin-top: 0px; margin-bottom: 0px; "><b><font size="3">&nbsp;&nbsp; &nbsp;</font></b><span style="font-weight: normal; "><font size="3">2.创建域</font></span><b><span style="font-weight: normal; ">，打开Serv-U，第一次运行会自动弹出向导，跟着做即可。填写完域名称后下一步到底单击完成即可。</span><font size="3">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</font></b></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; "><div id="hg50" style="margin-top: 0px; margin-bottom: 0px; text-align: left; "><a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_124cdb3rghc_b">&nbsp;&nbsp; &nbsp;<img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 431px; height: 447px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_124cdb3rghc_b" /></a>&nbsp;&nbsp; &nbsp;</div></div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">3.域创建完毕后会要求你新建一个账户</span><span style="font-weight: normal; "><font size="2">，确认后弹出用户创建向导。</font></span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;用户名和密码填写没有难度，只要注意用户名不要输入中文即可。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;下一步到根目录填写的时候，需要注意的是根目录填写为&quot;%Domain_home%&quot;（引号内内容，不包含引号），这个意思是域的根目录。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_125dm8nhkc5_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 450px; height: 306px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_125dm8nhkc5_b" /></a><br /> &nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;其余保持默认，下一步选择权限，只读代表只能看和下载，而不能做任何修改，完全访问则表示你对自己电脑上的文件能干什么就对服务器上的文件能干什么。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;完成后一个账户就创建成功了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">4.下面需要做的就是配置整个域的设置。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;把鼠标移动到下放的&ldquo;导航&rdquo;上并单击主页，回到主页面，找到&ldquo;域详细信息&rdquo;下面的子项目&ldquo;编辑域名和说明&rdquo;，单击它。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_126cbhrj6q2_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 476.8px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_126cbhrj6q2_b" /></a><br /> &nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;在域根目录一栏里填入一个文件夹路径，最好新建一个专用的FTP目录。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;最大尺寸代表向这个目录最大可以占用的空间，超过这个尺寸将上传失败。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;设置完毕单击下方的保存按钮，接下来通过导航按钮回到主界面。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">5.配置域的目录访问权限。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;单击&ldquo;目录&rdquo;下的子项目&ldquo;目录访问&rdquo;。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_127dm5qzvf7_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 476.8px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_127dm5qzvf7_b" /></a><br /> &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;只有在这个地方添加了访问权限才可以在登陆FTP以后见到。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;必须添加的项目是前面设置的域根目录，点击下方的&ldquo;添加&rdquo;，在出现的对话框中找到路径输入框，输入%Domain_home%,其他保持不变并按&ldquo;保存&rdquo;。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;现在已经可以通过在我的电脑的地址栏输入ftp://127.0.0.1访问了！</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;多嘴一句，关于上边的&ldquo;虚拟路径&rdquo;选项卡，其实一般情况下目录访问里面没必要添加其他路径，可是为何我这里会有如此多呢？</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;这就是虚拟路径的原因了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;在虚拟路径当中添加的文件夹和本地访问的位置完全不同，相当于&ldquo;快捷方式&rdquo;，可以把一个文件路径映射到FTP目录中！</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;而虚拟路径访问权限必须在目录访问中开通原始物理路径的权限。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;可能是由于安全原因，被映射的如果是文件夹的话，就只有向深处第二层的访问权限，所以深入的访问必须在目录访问中逐个开启深层目录的权限，&ldquo;子目录继承&rdquo;是没用的。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;好了，单就架设服务器这块来说，已经全部完成了，如果这时公网已经可以直接访问的话，就可以跳过这步，看最后对于服务器的限制相关内容了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h2 style="font-size: 14pt; "><span style="font-weight: normal; "><span style="background-color: rgb(106, 168, 79); ">五.让服务器和公网畅通无阻</span></span></h2><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;如果服务器和公网中间还夹着一层路由器的话，这时应当还不能直接访问到你的服务器，所以我们要打通这条道路。&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">方案一.在路由器上开启Upnp功能。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;这样serv-u可以动态的开启需要用到的端口来对外通信，但是这个方法并不好。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">方案二.在路由器上设置端口转发。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;这是我使用的方法，在路由器上开启端口转发功能，将20和21端口映射到本机的20和21端口，同时还需要映射一组10个端口用来支持<a id="ut_0" target="_blank" title="PASV模式" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/PASV+mode"><span style="text-decoration: none; "><b>PASV模式</b></span></a>。 &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;在Serv-U上也需设置，在主页找到&ldquo;服务器限制和设置&rdquo;下面的子项目&ldquo;维护服务器设置&rdquo;，在&ldquo;网络设置&rdquo;块下面的PASV端口范围填入2000-2010.&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;这里可以自由设置，只要在1024以上的端口即可，一般情况下10个足够用了。需要注意的是，设置的端口号必须和在路由器上映射的端口相同。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_128dkxpfgfw_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 476.8px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_128dkxpfgfw_b" /></a></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">方案三.在路由器上开启DMZ主机功能并且定向到服务器所在内网IP。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;这是最简便的办法，缺点是会导致主机安全性下降，DMZ的功能就是将路由器所有收到的数据包不经过滤原样给目标一份，所以很容易会被扫出并尝试入侵。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;个人不建议这么做，虽然服务器开启<a id="ss.j" target="_blank" title="DMZ" style="color: rgb(85, 26, 139); " href="http://baike.baidu.com/view/33936.html?tp=0_11"><b>DMZ</b></a>主机比较常见，但是路由器起到的<a id="frq_" target="_blank" title="堡垒主机" style="color: rgb(85, 26, 139); " href="http://www.hudong.com/wiki/%E5%A0%A1%E5%9E%92%E4%B8%BB%E6%9C%BA"><b>堡垒主机</b></a>的作用就失去了。<br /> &nbsp;</div><h2 style="font-size: 14pt; "><span style="font-weight: normal; "><span style="background-color: rgb(106, 168, 79); ">六.为了提高资源利用率，适当限制。</span></span></h2><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;假若不加以限制，这点带宽资源只要接入用户稍一多，立马被吞噬的渣都不剩，所以有必要对其进行限制设置。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">1.限制连接数。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;以下设置内容全部在&ldquo;限制和设置&rdquo;下的子项目&ldquo;创建并维护应用到域的限制&rdquo;中完成。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;双击&ldquo;域链接的最大会话数&rdquo;，确认后在新出现的对话框中变更设置。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;根据需要来设，我设置的是30，因为是日常用电脑。作为专用服务器，可以适当拓宽上限，100左右吧。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;而域中每个IP地址的最大会话数酌情设置5-10，否则当使用下载工具的时候服务器的负担会很重。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">2.限制速度。</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;在限制类型下拉菜单中选择&ldquo;数据传输&rdquo;项</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_129g98hpqgb_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 475.2px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_129g98hpqgb_b" /></a></div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;酌情设置&ldquo;域最大下载速度&rdquo;和&ldquo;域最大上传速度&rdquo;。<br /> &nbsp;</div><h3 style="font-size: 12pt; ">&nbsp;&nbsp; &nbsp;<span style="font-weight: normal; ">3.更好的中文支持</span></h3><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;默认设置下用一些客户端访问可能产生中文出现乱码，无法上传下载的情况，进行如下设置。 &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;进入&ldquo;FTP设置&rdquo;选项卡，点击定制按钮，在命令列表中找到&ldquo;OPTS UTF8&rdquo;，在上面单击鼠标右键，选择&ldquo;禁用命令&rdquo;。&nbsp;&nbsp;&nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<a target="_blank" href="http://docs.google.com/File?id=dfsv9fmc_131gjfb9mfj_b"><img style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; width: 640px; height: 476.8px; " alt="" src="http://docs.google.com/File?id=dfsv9fmc_131gjfb9mfj_b" /></a><br /> &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;接下来单击&ldquo;全局属性&rdquo;按钮，进入&ldquo;高级选项&rdquo;选项卡，取消&ldquo;对所有已收发的路径和文件名使用UTF-8编码&rdquo;前面的复选框的选中状态。&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;单击保存。</div><h2 style="font-size: 14pt; "><span style="font-weight: normal; "><span style="background-color: rgb(106, 168, 79); ">七.最后</span></span></h2><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;好了，这篇繁琐冗长的文章终于结束了，第一次用这样的风格写文，不足之处还请提点~</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;总体来说，我个人感觉写的还是相当通俗的，整个过程全部完成的话，在没有更复杂的要求前是完全足够用了。</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;</div><div style="margin-top: 0px; margin-bottom: 0px; ">&nbsp;&nbsp; &nbsp;写的如此详细也是非常累人的活啊&mdash;&mdash;甩着膀子感慨ing~</div><div>&nbsp;</div></div></div></div><p>&copy;2012 <a href="http://iamwd.com">WooDragon</a>. All Rights Reserved.</p>.]]></content:encoded> <wfw:commentRss>http://iamwd.com/posts/easy-to-build-pro-ftp-files-share-server.html/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
