FTP服务器安装部署文档20120302

FTP服务器安装部署文档20120302
======================
环境:CENTOS 5.5X64
IP:10.0.0.100
=====================
一:安装部署

wget https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.gz --no-check-certificate

tar zvfx pure-ftpd-1.0.42.tar.gz
cd pure-ftpd-1.0.42
./configure --prefix=/usr/local/pureftpd \
--with-everything 
make
make install
cd ..

cd pure-ftpd-1.0.42
cd configuration-file
chmod 755 pure-config.pl
cp pure-config.pl /usr/local/pureftpd/bin
mkdir -p /usr/local/pureftpd/etc
cp pure-ftpd.conf /usr/local/pureftpd/etc

二:新建用户
groupadd develop
useradd -g develop -s /sbin/nologin www

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 yes
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 10000 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
#Bind 10.0.0.100,9494
Umask 133:022
MinUID 500
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
MaxDiskUsage 99
CustomerProof yes
###########################################################################################

创建FTP账户密码:
/usr/local/pureftpd/bin/pure-pw useradd jesse -u www -g develop -d /test/ -m
Password:
Enter it again:

解释:
pure-pw useradd 虚拟用户名
-u 寄生到系统用户名
-d FTP目录
-m 把用户密码加入PDB数据库中,不需要重启FTP


虚拟用户生成的passwd文件在安装目录的etc的pureftpd.passwd,其目录OPT也必须有UID 500用户读写权限,
然后建立pureDB文件/usr/local/pureftpd/bin/pure-pw show jesse


启动ftp
/usr/local/pureftpd/bin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf

验证启动
netstat -lntup|grep pure-ftpd


接下来我们做访问测试
IP:10.0.0.100
账户:jesse
密码:123456
端口:9494

chown -R www:develop /test
访问测试OK!

posted on 2016-05-24 13:56 study notes 阅读(...) 评论(...) 编辑 收藏

导航

统计