1 * Step 1 (optional but recommended):
2
3 Create a specific, unprivileged user and group called _pure-ftpd, without any
4
5 valid shell. Don't use this for anything else, including FTP virtual users.
6
7 groupadd _pure-ftpd
8
9 useradd -g _pure-ftpd -d /var/empty -s /etc _pure-ftpd
10
11 If having a user whose name begins with an underscore is a no-go for you,
12
13 you can also call it pure-ftpd, without the underscore.
14
15 * Step 2:
16
17 If you have Cdialog or Xdialog installed on your system, try the following
18
19 command to build and install Pure-FTPd:
20
21 make -f Makefile.gui
22
23 If you don't have Cdialog or if you prefer the conventional way, here it is:
24
25 ./configure
26
27 make install-strip
28
29 Et voila! The software is now installed in /usr/local/sbin/pure-ftpd
30
31 * Step 3:
32
33 To launch the server, just type the following command:
34
35
36
37 /usr/local/sbin/pure-ftpd &
38
39 If you installed a binary package (RPM, SLP, Debian), maybe use the
40
41 following command instead:
42
43 /usr/sbin/pure-ftpd &
44
45 Your server is ready. Just type 'ftp localhost' to test it. If you want to
46
47 automatically run the server when the system boots, add the previous command
48
49 to /etc/rc.d/rc.local or /etc/rc.d/boot.local . Don't forget the '&' sign.
50
51 Note 1:
52
53 To compile under Irix, you have to issue this before typing ./configure:
54
55 export CC=cc
56
57 export CFLAGS=-I/usr/freeware/include
58
59 export LDFLAGS=-L/usr/freeware/lib32
60
61 To compile under Solaris, use GNU Make, not Solaris make. Then do:
62
63 export PATH=/usr/ccs/bin:$PATH
64
65 export MAKE=gmake
66
67 Nota 2:
68
69 To deinstall Pure-FTPd (no, do you really want to do this?), use:
70
71 ./configure
72
73 make uninstall
相关资料可查看下面站点:
http://www.pureftpd.org/project/pure-ftpd/doc
http://wiki.ubuntu.org.cn/Pure-ftpd
四.Pureftpd常见问题分析:
验证pureftpd主动模式下的传输端口
首先,通过windows下的doc命令对ftp进行访问
上传数据文件,验证主动模式下的数据传输端口是20
将传输到20端口的数据包丢弃,看主动模式下是否还能正常传输数据
实验证明将20端口关闭后,主动模式下无法正常传输数据
验证pureftpd被动模式下的传输端口
首先将pureftpd被动模式下的数据传输端口设置为30000到30010,重新启动pureftpd服务
用flashfxp登录ftp(通过被动模式pasv登录),属性->参数选择->数据连接模式(pasv)
通过flashfxp传输数据,查看数据传输端口是否在设定的值的范围内(30000:30010)
强制一个IP地址使用被动响应 (为什么linux命令pftp无法登录ftp,windows是用工具可以登录ftp)
从传输的数据及监听的端口进行分析
结论:都是强制一个IP地址使用被动响应 惹的祸
可以通过设置该参数解决问题
1 # 强制一个IP地址使用被动响应( PASV/EPSV/SPSV replies)。 - for NAT.
2
3 # Symbolic host names are also accepted for gateways with dynamic IP
4
5 # addresses.
6
7
8
9 # ForcePassiveIP 192.168.0.1(该参数是配置被动模式下服务器传输数据的ip地址)