大家注意一下: 在配置ftp前,你需要做的是关闭iptables以及selinux
service iptables stop
setenforce 0 //这个只是临时关闭,想永久关闭需要更改配置文件/etc/selinux/config
# cd /usr/local/src/进入src目录
#wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.37.tar.bz2下载源码包
# tar jxvf pure-ftpd-1.0.37.tar.bz2 解压源码包
# cd pure-ftpd-1.0.37进入源码包
# yum install -y openssl-devel 安装openssl
#./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits --with-tls 编译参数
#make
#make install
# ls /usr/local/pureftpd/查看目录下是否有bin sbin share三个目录
#cd configuration-file进入目录([root@localhost configuration-file]# pwd
/usr/local/src/pure-ftpd-1.0.37/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 拷贝
#chmod 755 /usr/local/pureftpd/sbin/pure-config.pl 修改权限
#vim /usr/local/pureftpd/etc/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
#mkdir /date/ftp -p创建访问目录
#chown -R tangtang /date/ftp
# /usr/local/pureftpd/bin/pure-pw useradd ftptangtang -u tangtang -d /date/ftp/设置ftp的用户名和密码(ftp账户:ftptangtang,系统账户:tangtang)
#/usr/local/pureftpd/bin/pure-pw mkdb #创建密码文件
(# /usr/local/pureftpd/bin/pure-pw list查看yi创建的用户)
(#/usr/local/pureftpd/bin/pure-pw userdel ftptangtang #删除用户)
启动pureftpd :
#/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
查看是否启动:
#ps aux |grep pure
#netstat -lnp