1.下载pure_ftpd,上传服务器,目录路径:/usr/local/src/
下载地址:https://pan.baidu.com/s/1kWe8FAn
2.安装pure_ftpd
cd /usr/local/src
tar -xjf pure-ftpd-1.0.36.tar.bz2
cd pure-ftpd-1.0.36
./configure --prefix=/usr/local/pure-ftpd CFLAGS=-O2 --with-puredb --with-quotas --with-cookie --with-virtualhosts --with-diraliases --with-sysquotas --with-ratios --with-altlog --with-paranoidmsg --with-shadow --with-welcomemsg --with-throttling --with-uploadscript --with-language=english --with-rfc2640
make && make install
mkdir /usr/local/pure-ftpd/etc
cp configuration-file/pure-ftpd.conf /usr/local/pure-ftpd/etc/
cp configuration-file/pure-config.pl /usr/local/pure-ftpd/sbin/
chmod 755 /usr/local/pure-ftpd/sbin/pure-config.pl
cd /usr/local/bin/
ln -s /usr/local/pure-ftpd/bin/* .
ln -s /usr/local/pure-ftpd/sbin/* /usr/local/sbin/
ln -s /usr/local/pure-ftpd/man/man8/* /usr/local/share/man/man8/
pure-config.pl /usr/local/pure-ftpd/etc/pure-ftpd.conf
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
pure-pw useradd testuser -u ftpuser -d /data/wwwroot/testuser/
# 如果添加完成以后想要删除可以使用pure-pw userdel admintestnew这条指令
# 想要修改密码可以使用pure-pw passwd admintestnew这条指令
# 查看用户信息
pure-pw show testuser
# 生成数据库文件
pure-pw mkdb
# 打开配置文件
vi /usr/local/pure-ftpd/etc/pure-ftpd.conf
# 重新生成数据库文件
pure-pw mkdb
# 先把之前的pureftp服务kill掉
killall pure-ftpd
# 然后重新启动
/usr/local/pure-ftpd/sbin/pure-config.pl /usr/local/pure-ftpd/etc/pure-ftpd.conf