pureftp部署和优化
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pureftp部署和优化相关的知识,希望对你有一定的参考价值。
1、下载pureftp程序上传到/usr/local/src目录
cd /usr/local/src/
2、解压
tar -zxvf pure-ftpd-1.0.37.tar.gz
3、配置编译参数
cd pure-ftpd-1.0.37
./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits --with-tls
4、编译
make
5、安装
make install
6、拷贝配置文件
cd /usr/local/src/pure-ftpd-1.0.37/configuration-file/
cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
7、拷贝启动文件
cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
8、编辑配置文件
> /usr/local/pureftpd/etc/pure-ftpd.conf
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
9、启动pure-ftpd
/usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf 加入这一行实现开机启动 vim /etc/rc.d/rc.local /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
10、建立虚拟账号
mkdir /tmp/ftp
useradd river
chown -R river /tmp/ftp /usr/local/pureftpd/bin/pure-pw useradd ftpuser1 -uriver -d /tmp/ftp(将虚拟账号ftpuser1和系统用户river关联) /usr/local/pureftpd/bin/pure-pw mkdb(创建用户信息数据库文件) yum install -y lftp[[email protected] configuration-file]# lftp [email protected]
口令:
lftp [email protected]:~> ls
drwxr-xr-x 2 502 river 4096 May 31 14:43 .
drwxr-xr-x 2 502 river 4096 May 31 14:43 ..
-rw-r--r-- 1 502 river 0 May 31 14:43 123.txt
lftp [email protected]:/>
12、在客户端远程登陆
yum install -y lftp
lftp [email protected]:/> mkdir 123
mkdir 成功, 建立 `123‘
lftp [email protected]:/> ls
drwxr-xr-x 3 502 river 4096 May 31 16:06 .
drwxr-xr-x 3 502 river 4096 May 31 16:06 ..
drwxr-xr-x 2 502 river 4096 May 31 16:06 123
-rw-r--r-- 1 502 river 0 May 31 14:43 123.txt
lftp [email protected]:/> get 123.txt
lftp [email protected]:/> quit
[[email protected] opt]# ls\
> ^C
[[email protected] opt]# ls
123.txt 1.txt 2.txt 3.txt 4.txt
[[email protected] opt]#
可以看到成功连接并下载使用get下载使用put上传,使用?查看lftp所有支持的命令
本文出自 “愺艮搥豩” 博客,请务必保留此出处http://riverxyz.blog.51cto.com/533303/1784890
以上是关于pureftp部署和优化的主要内容,如果未能解决你的问题,请参考以下文章