centos和debian8安装pureftpd

marksugar
2015-12-16 / 0 评论 / 3,713 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2015年12月16日,已超过2609天没有更新,若内容或图片失效,请留言反馈。

1,编译安装

cd /usr/local/src/
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
tar xf 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
yum install openssl
yum install openssl-devel
 ./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits  --with-tls make && make install

2,配置文件

[root@node pure-ftpd-1.0.42]# cd configuration-file/
[root@node configuration-file]# mkdir -p /usr/local/pureftpd/etc/
[root@node configuration-file]# cp pure-ftpd.conf    /usr/local/pureftpd/etc/pure-ftpd.conf
[root@node configuration-file]# cp pure-config.pl    /usr/local/pureftpd/sbin/pure-config.pl
[root@node configuration-file]#  chmod 755    /usr/local/pureftpd/sbin/pure-config.pl
[root@node configuration-file]# vim /usr/local/pureftpd/etc/pure-ftpd.conf 
[root@node configuration-file]# cd /usr/local/pureftpd/etc/
[root@node etc]# > pure-ftpd.conf 
[root@node etc]# vim 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

4,创建用户

[root@node etc]#useradd mark

5,创建ftp目录

[root@node etc]# mkdir /opt/mark

6,修改映射的系统用户租

[root@node etc]# chown -R mark:mark /opt/mark/
[root@node etc]# /usr/local/pureftpd/bin/pure-pw useradd ftp2 -umark -d /opt/mark/

useradd ftpuser1 添加虚拟账户ftp2
-uftp -d /tmp/ftp/ -u ftp是映射用户,/tmp/ftp是指定ftp目录

[root@node etc]# /usr/local/pureftpd/bin/pure-pw mkdb

列出用户

[root@node etc]# /usr/local/pureftpd/bin/pure-pw list
ftpuser1            /tmp/ftp/./                                                
[root@node etc]# 

删除

[root@node etc]# /usr/local/pureftpd/bin/pure-pw userdel ftpuser1

启动:

[root@node etc]# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
Running: /usr/local/pureftpd/sbin/pure-ftpd -A -c50 -B -C8 -D -fftp -H -I15 -lpuredb:/usr/local/pureftpd/etc/pureftpd.pdb -L3136:8 -m4 -s -U133:022 -u100 -g/usr/local/pureftpd/var/run/pure-ftpd.pid -k99 -Z
[root@node etc]# 

debian安装

debian 8.2 install pureftp
[root@debian /]# apt-get install pure-ftp-common pure-ftpd
[root@debian /etc/pure-ftpd]# cd /etc/pure-ftpd
[root@debian /etc/pure-ftpd]# cd auth/
[root@debian /etc/pure-ftpd/auth]# ls
65unix    70pam
[root@debian /etc/pure-ftpd/auth]# ln -s ../conf/PureDB 60pdb
[root@debian /etc/pure-ftpd/auth]# cd /etc/pure-ftpd/^C
[root@debian /etc/pure-ftpd/auth]# /etc/init.d/pure-ftpd restart
[ ok ] Restarting pure-ftpd (via systemctl): pure-ftpd.service.
[root@debian /etc/pure-ftpd/auth]# 

添加永和centos一样!
pure-ftpd.png

0

评论

博主关闭了当前页面的评论