1.1 pure-ftp 下载pureftp
切换到目录:cd /usr/local/src/
下载文件:pure-ftpd-1.0.29.tar.gz,并将该文件放在cd /usr/local/src/目录中
1.2 安装pure-ftp
tar -zxvf pure-ftpd-1.0.29.tar.gz
cd pure-ftpd-1.0.29
./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits --with-tls
make && make install
1.3 修改配置文件
cd /usr/local/src/pure-ftpd-1.0.29/configuration-file
mkdir -p /usr/local/pureftpd/etc/ #创建etc配置文件目录
cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf #拷贝配置文件
cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl #拷贝启动文件到sbin目录
chmod a+x /usr/local/pureftpd/sbin/pure-config.pl #给启动文件授可执行权限
1.4 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
1.5、启动
/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
1.6 创建账号
创建成功后,可用ftp通过21端口登录
mkdir /data/wwwroot/
useradd www
chown -R www:www /data/wwwroot/
/usr/local/pureftpd/bin/pure-pw useradd ftp_user1 -uwww -d /data/www/ #提示输入密码
/usr/local/pureftpd/bin/pure-pw mkdb #创建密码文件,保存密码
/usr/local/pureftpd/bin/pure-pw list #查看当前的用户信息列表
/usr/local/pureftpd/bin/pure-pw userdel ftp_user2 #删除当前的ftp账号