发布于 2016-01-03 11:56:16 | 395 次阅读 | 评论: 0 | 来源: PHPERZ
Pure-FTPd FTP服务器
Pure-FTPd 是一个快速、高效、轻便、安全的FTP服务器,它不象其他流行的FTP SERVER软件。以安全和配置简单为设计目标,支持虚拟主机,IPV6,PAM等功能。
一、安装pure-ftpd
cd /usr/local/src/
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.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
二、配置
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
chmod755 /usr/local/pureftpd/sbin/pure-config.pl
删除全部,加入:
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
启动pure-ftpd:(pl+配置文件则为启动)
/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
建立账号
mkdir /data/www/
useradd www
chown -R www:www/data/www/
/usr/local/pureftpd/bin/pure-pwuseradd ftp_user1 -uwww -d /data/www/
Password:
Enter it again:
注:-u为虚拟用户ftp_user1映射的真实用户www;-d为ftp的家目录;
还有最关键的一步,就是创建用户信息数据库文件:
/usr/local/pureftpd/bin/pure-pwmkdb
列出当前账号:
/usr/local/pureftpd/bin/pure-pwlist
删除账号的命令为:
/usr/local/pureftpd/bin/pure-pw userdel ftp_user2
三、测试
client端
yum install -y lftp
lftp ftp_user1@Server端ip