CentOS安装 pure-ftpd

yum -y install pam-devel

cd /usr/local
tar zxf pure-ftpd-1.0..tar.gz
cd pure-ftpd-1.0. ./configure --prefix=/usr/local/pure-ftpd/ --with-puredb
make && make check && make install
mkdir -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.pdb
cd /usr/local/pure-ftpd-1.0./configuration-file
cp /usr/local/pure-ftpd-1.0./configuration-file/pure-ftpd.conf /usr/local/pure-ftpd-1.0./configuration-file/pure-ftpd.conf.backup vim /usr/local/pure-ftpd-1.0./configuration-file/pure-ftpd.conf
配置文件里 pure-ftpd.conf
指定pdb位置
PureDB /usr/local/pure-ftpd/etc/pureftpd.pdb
修改端口
PassivePortRange chmod /usr/local/pure-ftpd-1.0./configuration-file/pure-config.pl
/usr/local/pure-ftpd-1.0./configuration-file/pure-config.pl /usr/local/pure-ftpd-1.0./configuration-file/pure-ftpd.conf 使用 id www 查看组信息
大概会输出以下内容
uid=(www) gid=(www) 组=(www)
# 添加虚拟用户并映射到www用户
# 语法 /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 -g -d /data/www -m # 添加防火墙规则
vim /etc/sysconfig/iptables
# 在适当位置添加
-A INPUT -p tcp --dport -j ACCEPT
-A INPUT -p tcp --dport : -j ACCEPT service iptables restart # pure-ftpd 命令帮助
# 查看已有用户
/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 # 新增用户后,要更新到数据库中,执行
/usr/local/pure-ftpd/bin/pure-pw mkdb # 禁止匿名用户登录
vi /etc/passwd
把 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin 这行注释掉或删除
上一篇:extJs学习基础


下一篇:extJs学习基础 容器的介绍