下载源码包
wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.46.tar.bz2
解压,进入目录
tar xf pure-ftpd-1.0.46.tar.bz2
cd pure-ftpd-1.0.46
配置
./configure --prefix=/usr/local/pureftpd
--without-inetd
--with-altlog
--with-puredb
--with-throttling
--with-peruserlimits
--with-tls
错误:
没编译器
configure: error: no acceptable C compiler found in $PATH
yum -y install gcc gcc-c++
错误:
缺少SSL头文件
configure: error: OpenSSL headers not found.
yum -y install openssl-devel
没错误了
make
make install
改配置文件 vi /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
建立系统用户
useradd aaa
建立ftp的分享目录,改一下权限
mkdir /data/aaa
chown -R aaa:aaa /data/aaa
建立虚拟用户,FTP通过虚拟用户登录,登录时也要用虚拟用户名,但是在系统访问时,要用系统用户访问共享目录,多个虚拟用户可以映射到一个系统用户上
bin/pure-pw useradd gonganju -u aaa -d /data/aaa
然后输入两遍密码
sbin/pure-ftpd /usr/local/pureftpd/etc/pure-ftpd.conf
检查虚拟用户
pure-pw list
保存用户
pure-pw mkdb
服务启动了,检查一下启动了没有。
netstat -an
用ftp客户端试一试,可以上传下载