pure-ftpd安装步骤

  1. 下载pure-ftpd工具

  2. cd /usr/local/src/

  3. wget
  4. 安装pure-ftpd

5. tar jvxf pure-ftpd-1.0.42.tar.bz2

6. cd pure-ftpd-1.0.42

 

./configure \
--prefix=/usr/local/pureftpd \
--without-inetd \
--with-altlog \
--with-puredb \
--with-throttling \
--with-peruserlimits  \
--with-tls

这里如果出现错误:

安装gcc,出现openssl错误,安装openssl和openssl-devel

7. make&make install

8. mkdir -p /usr/local/pureftpd/etc/ 

  cd configuration-file


9. 

 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

10修改vim /usr/local/pureftpd/etc/pure-ftpd.conf 或> /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

11.启动pure-ftpd


/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf


12.建立账号


[root@localhost ~]# mkdir /data/www/
[root@localhost ~]# useradd www
[root@localhost ~]# chown -R www:www /data/www/
[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw useradd ftp_user1  -uwww -d /data/www/
Password:
Enter it again:

13.创建用户信息数据库文件


/usr/local/pureftpd/bin/pure-pw mkdb


14.

pure-pw还可以列出当前的ftp账号,当然也可以删除某个账号, 我们再创建一个账号:

[root@localhost ~]#  /usr/local/pureftpd/bin/pure-pw  useradd ftp_user2 -uwww -d /tmp
[root@localhost ~]#  /usr/local/pureftpd/bin/pure-pw mkdb

列出当前账号:

[root@localhost ~]# /usr/local/pureftpd/bin/pure-pw list

删除账号的命令为:

[root@localhost ~]#  /usr/local/pureftpd/bin/pure-pw  userdel ftp_user2

测试pure-ftpd

测试需要使用的工具叫做lftp, 先安装一下它:

[root@localhost ~]# yum install -y lftp

测试:

[root@localhost ~]# touch /data/www/123.txt
[root@localhost ~]# lftp [email protected]
口令:
lftp [email protected]:~> ls
drwxr-xr-x    2 514        www              4096 Jun 12 11:14 .
drwxr-xr-x    2 514        www              4096 Jun 12 11:14 ..
-rw-r--r--    1 514        www                 0 Jun 12 11:14 123.txt


本文出自 “Linux学习空间” 博客,转载请与作者联系!

你可能感兴趣的:(Pure-FTPd)