August 27, 2010 by Chan Cham Chung
小测试了一下,发现我一直用的 proftpd 其实速度并不甚好,就是功能完善。
此测试使用大量小文件,从ftp server 上,下载回来本地。
大文件测试意义不大。
测试数次,速度上可能会稍有不同,不过相对速度是一致的。
纯玩玩,只用了几分钟测试,不作权威对比。
proftpd:
Total: 62 directories, 28853 files, 0 symlinks
332649527 bytes transferred in 270 seconds (1.18M/s)
pureftpd :
Total: 62 directories, 28817 files, 0 symlinks
332166614 bytes transferred in 129 seconds (2.46M/s)
vsftpd;
Total: 62 directories, 28853 files, 0 symlinks
332649527 bytes transferred in 146 seconds (2.17M/s)
Tags: ftp
Categories: technology •
3 Comments »
April 17, 2010 by Chan Cham Chung
看了这篇文章:http://www.sapub.net/html/y2010/ftp-proxy-large-scale-site.html ,提及到ftp proxy ,以前真没用过。不过以前折腾过 proftpd + ssl/tls + mysql ,当时还因为一个 proftpd 的一个bug ,折腾了几天。那就试玩下ftp proxy 咯。
安装 ftp-proxy :
wget ftp://ftp.ftpproxy.org/pub/ftp.proxy/ftpproxy-1.2.3.tgz
tar czvf ftpproxy-1.2.3.tgz
cd ftpproxy-1.2.3
make && make install
简单至极,连Makefile 都写好了。默认安装在 /usr/local/sbin/ftp.proxy 里。
假设 192.168.1.100 上,已经安装了一个 ftp ,用户名 lazybug ,密码 123456 。此机器没有外网 ip 。
安装ftp proxy 的主机外网 ip 为 220.181.100.100 ,内网与 ftp 主机可以连通。
启动 ftp proxy :
ftp.proxy -D 2121 -e -l -m -t 1800
也是超简单的一句命令,各参数意义为:
1)-D 2121 指定端口为2121
2)-e 启用客户端服务器选择(非常重要),通常我们的ftp账号为ftpuser这种,那么使用此参数后,我们可以访问后端的某台服务器,比如192.168.1.15,使用的账号名变成:ftpuser@192.168.1.15
3)-l Logging
4)-m monitor mode
5)-t 1800 超时时间
好,在本机连接 ftp proxy 吧:
ftp 220.181.100.100 2121
Connected to 220.181.100.100.
220 server ready – login please
Name (220.181.100.100:ladybug): lazybug@192.168.1.100
331 password required
Password:
230 login accepted
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
好了成功登录了!!
纯试玩,以供日后需求所需。
Tags: ftp
Categories: technology •
No Comments »