(一)下载pureftp

       cd /usr/local/src

      wget https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.37.tar.bz2

(二)安装

  

#tar jxf pure-ftpd-1.0.42.tar.bz2
#cd pure-ftpd-1.0.42
#./configure \
--prefix=/usr/local/pureftpd \
--without-inetd \
--with-altlog \
--with-puredb \
--with-throttling \
--with-peruserlimits  \
--with-tls


# make && make install
(三)配置pureftp
#cd configuration-file
#mkdir -p /usr/local/pureftpd/etc
#cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
#cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
#chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
修改文件
#> /usr/local/pureftpd/etc/pure-ftpd.conf    (清空)
#vim /usr/local/pureftpd/etc/pure-ftpd.conf  (加入如下)
ChrootEveryone              yes
BrokenClientsCompatibility  no
MaxClientsNumber            50
Daemonize                   yes
MaxClientsPerIP             8
VerboseLog                  no
DisplayDotFiles             yes
AnonymousOnly               no
NoAnonymous                 no
SyslogFacility              ftp
DontResolve                 yes
MaxIdleTime                 15
PureDB                        /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion              3136 8
AnonymousCanCreateDirs      no
MaxLoad                     4
AntiWarez                   yes
Umask                       133:022
MinUID                      100
AllowUserFXP                no
AllowAnonymousFXP           no
ProhibitDotFilesWrite       no
ProhibitDotFilesRead        no
AutoRename                  no
AnonymousCantUpload         no
PIDFile                     /usr/local/pureftpd/var/run/pure-ftpd.pid
MaxDiskUsage               99
CustomerProof              yes

(四)启动

#cd /use/local/pureftpd/

#./sbin/pure-config.pl ; ./etc/pure-ftpd.conf

(五)建立账号

#mkdir /data/aaa/

#useradd aaa

#chown -R aaa:aaa /data/aaa/

#/usr/local/pureftpd/bin/pure-pw useradd ftp-user1 -uaaa -d /data/aaa/

password:

Enter it again:

#/usr/local/pureftpd/bin/pure-pw mkdb (创建用户信息数据库文件)

#/usr/local/pureftpd/bin/pure-pw useradd ftp-user2 -uaaa -d /tmp/

password:

Enter it again:

#/usr/local/pureftpd/bin/pure-pw list   (列出当前账户)

#/usr/local/pureftpd/bin/pure-pw userdel ftp-user2  (删除账户)

(六)测试pure-ftpd


#touch /data/aaa/123.txt    (创建一个123.txt文件)

到另一台机器上

#yum install -y lftp

#lftp ftp-user1@192.168.186.11

wKiom1cnCb-DocqJAAAhgNpi8gE341.png

进行ftp访问