[root@server ~]#cd /usr/local/src/tarbag/
[root@server tarbag]#tar -zxvf pure-ftpd-1.0.22.tar.gz -C ../software/
[root@server tarbag]#cd ../software/pure-ftpd-1.0.22/
[root@server pure-ftpd-1.0.22]#./configure --prefix=/usr/local/pureftpd --with-everything
[root@server pure-ftpd-1.0.22]#make && make install
[root@server pure-ftpd-1.0.22]#cp configuration-file/pure-config.pl /usr/local/pureftpd/bin/
[root@server pure-ftpd-1.0.22]#cp configuration-file/pure-ftpd.conf /usr/local/pureftpd/etc/
[root@server pure-ftpd-1.0.22]#cp contrib/redhat.init /etc/init.d/pureftpd (这个脚本可以用来实现自启动)

[root@server pure-ftpd-1.0.22]#ls ./*.conf
./pureftpd-ldap.conf ./pureftpd-mysql.conf ./pureftpd-pgsql.conf
[root@server pure-ftpd-1.0.22]#cp ./*.conf /usr/local/pureftpd/etc/
[root@server pure-ftpd-1.0.22]#chmod +x /usr/local/pureftpd/bin/pure-config.pl
[root@server ~]#grep -v '^#' /usr/local/pureftpd/etc/pure-ftpd.conf |sort |uniq

AllowAnonymousFXP           no
AllowUserFXP                no
AnonymousCanCreateDirs      no
AnonymousCantUpload         no
AnonymousOnly               no
AntiWarez                   yes
AutoRename                  no
BrokenClientsCompatibility no
ChrootEveryone              yes //锁定所有用户到家目录中
CustomerProof               yes
Daemonize                   yes
DisplayDotFiles             yes            //显示目录下的隐含文件
DontResolve                 yes               //不进行反向解析
LimitRecursion              2000 8             //别表最大显示2000个文件,最深8个目录
MaxClientsNumber            50       //最大的客户端数量
MaxClientsPerIP               //同一个IP允许8个链接
MaxDiskUsage                99       //磁盘的最大利用率
MaxIdleTime                 15       //最大空闲15分钟
MaxLoad                                  //最多可下载的数量
MinUID                      1000 //用户ID至少要大于1000才能登陆
NoAnonymous                 yes    //不允许匿名用户登录
ProhibitDotFilesRead        no
ProhibitDotFilesWrite       no
PureDB                      /usr/local/pureftpd/etc/pureftpd.pdb //虚拟用户数据库
SyslogFacility              ftp
Umask                       133:022      //文件和目录的umask
VerboseLog                  no       / /不记录详细的日志信息

[root@server ~]#/usr/local/pureftpd/bin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
Running: /usr/local/pureftpd/sbin/pure-ftpd -A -c50 -B -C8 -D -E -fftp -H -I15 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L2000:8 -m4 -s -U133:022 -u1000 -k99 -Z
[root@server ~]#netstat -ntpl |grep 21tcp            0        *                   LISTEN      9553/pure-ftpd (SER
tcp            0 :::21                       :::*                        LISTEN      9553/pure-ftpd (SER

[root@server ~]#killall pure-ftpd
[root@server ~]#netstat -ntpl |grep 21

[root@server ~]#groupadd -g 1000 ftpgroup
[root@server ~]#useradd -g ftpgroup -u 1000 -d /dev/null -s /sbin/nologin ftpuser
[root@server ~]#/usr/local/pureftpd/bin/pure-pw useradd yang -u ftpuser -d /usr/local/src/ -m
Enter it again:
[root@server ~]#/usr/local/pureftpd/bin/pure-pw list
yang                /usr/local/src/./                                         
[root@server ~]#/usr/local/pureftpd/bin/pure-pw show yang

Login              : yang
Password           : $1$3/SblBu0$cs./Rn31HFaiOgRDo6le60
UID                : 1000 (ftpuser)
GID                : 1000 (ftpgroup)
Directory          : /usr/local/src/./
Full name          :
Download bandwidth : 0 Kb (unlimited)
Upload   bandwidth : 0 Kb (unlimited)
Max files          : 0 (unlimited)
Max size           : 0 Mb (unlimited)
Ratio              : 0:0 (unlimited:unlimited)
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :
Time restrictions : 0000-0000 (unlimited)
Max sim sessions   : 0 (unlimited)
[root@server ~]#grep '/usr/local' /etc/init.d/pureftpd
$fullpath /usr/local/pureftpd/etc/pure-ftpd.conf --daemonize
[root@server ~]#service pureftpd start
启动 pure-config.pl:Running: /usr/local/pureftpd/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -E -fftp -H -I15 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L2000:8 -m4 -s -U133:022 -u100 -k99 -Z

[root@server ~]#netstat -ntpl |grep 21
tcp            0        *                   LISTEN      10166/pure-ftpd (SE
tcp            0 :::21                       :::*                        LISTEN      10166/pure-ftpd (SE
[root@server ~]#ftp
Connected to
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 16:07. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
500 This security scheme is not implemented
500 This security scheme is not implemented
KERBEROS_V4 rejected as an authentication type
Name ( yang
331 User yang OK. Password required
230-User yang has group access to: 1000     
230 OK. Current directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is your current location
ftp> ls
227 Entering Passive Mode (127,0,0,1,172,137)
150 Accepted data connection
drwxr-xr-x    5 0                        4096 Jan 13 12:46 .
drwxr-xr-x    5 0                        4096 Jan 13 12:46 ..
drwxrwxrwx    8 0                        4096 Jan 22 18:08 share
drwxr-xr-x   13 0                        4096 Jan 25 15:11 software
drwxr-xr-x    3 0                        4096 Jan 25 15:09 tarbag
226-Options: -a -l
226 5 matches total

修改虚拟用户的参数,更详细的参数可以使用pure-pw --help查看:
[root@server ~]#/usr/local/pureftpd/bin/pure-pw usermod yang -R
[root@server ~]#/usr/local/pureftpd/bin/pure-pw show yang |grep 'IP'
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :