首页 > 代码库 > pure-ftpd 安装教程(超好用的FTP服务)

pure-ftpd 安装教程(超好用的FTP服务)

yum -y install pam-develwget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.36.tar.gztar zxf pure-ftpd-1.0.36.tar.gzcd pure-ftpd-1.0.36./configure --prefix=/usr/local/pure-ftpd/ --with-puredbmake && make check && make installmkdir -p /usr/local/pure-ftpd/etc/touch /usr/local/pure-ftpd/etc/pureftpd.passwd/usr/local/pure-ftpd/bin/pure-pw mkdb /usr/local/pure-ftpd/etc/pureftpd.pdbcd /usr/local/pure-ftpd-1.0.36/configuration-filevim /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.conf# 配置文件里pure-ftpd.conf# 指定pdb位置PureDB /usr/local/pure-ftpd/etc/pureftpd.pdb       # 修改端口PassivePortRange 30000 30500chmod 777 /usr/local/pure-ftpd-1.0.36/configuration-file/pure-config.pl/usr/local/pure-ftpd-1.0.36/configuration-file/pure-config.pl  /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.confgroupadd ftp_useruseradd wfc_ftpgpasswd  -a  wfc_ftp ftp_user# 查看组信息id wfc_ftp# 大概会输出以下内容# uid=502(wfc_ftp) gid=503(wfc_ftp) 组=503(wfc_ftp),502(ftp_user)# 创建用户ftp根目录mkdir -p /data/ftp_data/wfcchown wfc_ftp:ftp_user /data/ftp_data/wfc# 添加用户# 语法 /usr/local/pure-ftpd/bin/pure-pw useradd $user -u $uid -g $gid -d $dir -m/usr/local/pure-ftpd/bin/pure-pw useradd  wfc_ftp -u 502 -g 503 -d /data/ftp_data/wfc -m# 添加防火墙规则vim /etc/sysconfig/iptables# 在适当位置添加-A INPUT -p tcp --dport 21 -j ACCEPT-A INPUT -p tcp --dport 30000:30500 -j ACCEPT# 重载防火墙规则service iptables restart# 查看已有用户/usr/local/pure-ftpd/bin/pure-pw list# 删除用户/usr/local/pure-ftpd/bin/pure-pw userdel $user -m# 修改密码/usr/local/pure-ftpd/bin/pure-pw passwd $user -m


 

pure-ftpd 安装教程(超好用的FTP服务)