FTP详细配置.docx

上传人:b****4 文档编号:5466940 上传时间:2022-12-16 格式:DOCX 页数:17 大小:1.08MB
下载 相关 举报
FTP详细配置.docx_第1页
第1页 / 共17页
FTP详细配置.docx_第2页
第2页 / 共17页
FTP详细配置.docx_第3页
第3页 / 共17页
FTP详细配置.docx_第4页
第4页 / 共17页
FTP详细配置.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

FTP详细配置.docx

《FTP详细配置.docx》由会员分享,可在线阅读,更多相关《FTP详细配置.docx(17页珍藏版)》请在冰豆网上搜索。

FTP详细配置.docx

FTP详细配置

FTP服务器配置详细

首先我们在网上下载好ftp-server的开源文件,这里我们准备了

pure-ftpd-1.0.36.tar.gz的压缩包

接下来我们启动虚拟机

然后在启动远程控制软件secureCRT

启动secureFX

接着把我们下载的FTP压缩包进行上传,即把压缩包拖入到第一个窗口,我们把它放在/var/lib这个目录下

结果如下:

接着我们去远程控制端查看该文件的上传情况:

我们从中看到了我们的FTP压缩文件

然后我们对其进行解压:

使用解压命令:

tar–zxvffile.tar.gz

具体演示如下:

接着我们查看解压后的文件是否已存在:

我们看到已经解压成功

接着我们对解压文件进行编译安装:

使用命令有:

cdpure-ftpd-1.0.36

./configure–with-everything

Make

Makeinstall

安装成功后

我们为ftp服务器建立用户组

为组员建立存储位置

接下来我们要让它能够自动启动ftp服务

这里我们已经建立好了FTP服务器

接下来我们就要为其他用户开设账号密码和空间

我们增加一个用户test03并生成用户数据,

接着我们去本地机打开dos命令窗口,来实验这个用户能否登录到这个空间

用户test03能够正常登陆

接下来我们查看服务器的用户有哪些

发现已经为三个用户开设了空间

我们使用test01来进行上传下载,来看FTP服务器的配置

我们先看test01的空间里面有什么文件

我们在DOS命令窗口下载00.text

显示下载成功

我们去

这个目录下查找是否存在00.txt这个文件

然后我们再在这个目录下重新创建一个文件sun.doc

我们把这个文件上传到服务器

上传成功

我们再去服务器那边查看test01空间下是否存在这个文件了

已存在

最后我们通过Dreamweaver连接FTP服务器对我们开发的网页进行更新上传

首先建立站点

建立好站点后,连接远程服务器

我们建立了一个123.html的网页,将它上传到服务器

服务器端文件:

最后我们通过浏览器来访问我们创建的网页

123网页如下:

对一些命令的翻译如下:

1.INSTALL

Thesimplestwaytocompilethispackageis:

1.`cd'tothedirectorycontainingthepackage'ssourcecodeandtype

`./configure'toconfigurethepackageforyoursystem.

Running`configure'mighttakeawhile.Whilerunning,itprints

somemessagestellingwhichfeaturesitischeckingfor.

2.Type`make'tocompilethepackage.

3.Optionally,type`makecheck'torunanyself-teststhatcomewith

thepackage,generallyusingthejust-builtuninstalledbinaries.

4.Type`makeinstall'toinstalltheprogramsandanydatafilesand

documentation.Wheninstallingintoaprefixownedbyroot,itis

recommendedthatthepackagebeconfiguredandbuiltasaregular

user,andonlythe`makeinstall'phaseexecutedwithroot

privileges.

5.Optionally,type`makeinstallcheck'torepeatanyself-tests,but

thistimeusingthebinariesintheirfinalinstalledlocation.

Thistargetdoesnotinstallanything.Runningthistargetasa

regularuser,particularlyiftheprior`makeinstall'required

rootprivileges,verifiesthattheinstallationcompleted

correctly.

6.Youcanremovetheprogrambinariesandobjectfilesfromthe

sourcecodedirectorybytyping`makeclean'.Toalsoremovethe

filesthat`configure'created(soyoucancompilethepackagefor

adifferentkindofcomputer),type`makedistclean'.Thereis

alsoa`makemaintainer-clean'target,butthatisintendedmainly

forthepackage'sdevelopers.Ifyouuseit,youmayhavetoget

allsortsofotherprogramsinordertoregeneratefilesthatcame

withthedistribution.

7.Often,youcanalsotype`makeuninstall'toremovetheinstalled

filesagain.Inpractice,notallpackageshavetestedthat

uninstallationworkscorrectly,eventhoughitisrequiredbythe

GNUCodingStandards.

8.Somepackages,particularlythosethatuseAutomake,provide`make

distcheck',whichcanbyusedbydeveloperstotestthatallother

targetslike`makeinstall'and`makeuninstall'workcorrectly.

Thistargetisgenerallynotrunbyendusers.

最简单的方法编译这个包是:

  

  1。

“cd”目录包含包的源代码和类型。

’./configure’是为您的系统配置这个包。

  

  运行“配置”可能需要一段时间。

在运行时,它将打印一些消息告诉哪些特性是检查。

  

  2。

类型’make’来编译包。

  

  3。

可选地,`makecheck'来运行任何自我测试,来与包,通常使用刚刚建成的卸载二进制文件。

4。

类型“makeinstall”安装程序和任何数据文件和文档。

当安装到一个前缀属于根,建议包被配置和构建为一个普通用户,只有“makeinstall”阶段执行使用root特权。

5。

可选地,输入“使installcheck“重复任何自我测试,但是这一次使用二进制文件安装在他们的最后位置。

这一目标不安装任何东西。

运行这个目标作为一个普通用户,特别是如果事先“makeinstall'requiredroot特权,验证正确完成安装。

6。

您可以删除程序二进制文件和对象文件源代码目录通过键入“使清洁”。

也删除文件,创建“配置”(这样你可以编译包的一种不同的计算机),键入“使distclean”。

还有一个“让维修工清洁”的目标,但这主要的目的为包的开发人员。

如果你使用它,你可能已经去获取各种其他程序以修复来自分布式的文件。

7。

通常,您也可以输入'让卸载”来删除所安装的文件再一次。

在实践中,并不是所有的包已经测试了,卸载工作正常,尽管它是由GNU编码标准的要求。

8。

一些包,特别是那些使用Automake、提供“使distcheck’,它可以通过开发人员用于测试,所有其他目标像‘makeinstall”和“让卸载的正常工作。

这个目标通常不是由最终用户运行

2.README

FYI,thebinaryRPMpackagesofPure-FTPdareconfiguredwiththefollowing

commandline:

./configure--with-everything--with-paranoidmsg--without-capabilities\

--with-virtualchroot

RPMpackagesarealsocompiledwith--without-pamtoenhancetheir

portability.

  通知你,二进制RPM软件包的配置Pure-FTPd与以下

  命令行:

RPM包也是编译—--without-pam提高他们的可移植性

Thisistherecommendedwaytostarttheserver.

Unlessyoucompiledtheserverwith"--without-standalone",runningthe

serverisaseasyastyping:

这是推荐的方式启动服务器。

  

 除非你编译服务器与“--without-standalone”,运行服务器一样容易打字。

:

  

Inthefollowingexamples,wewillassumethatthe'pure-ftpd'fileis

locatedin/usr/local/sbin.Thisisthedefaultifyoucompiledtheserver

fromthesourcecodetarball.ButasIsaidearlierinthisdocument,if

youinstalledabinarypackage(RPM,SLP,DEB,TGZ),theservermaybe

installedin/usr/sbin/.Sojustreplace'/usr/local/sbin/pure-ftpd'with

'/usr/sbin/pure-ftpd'.

Whenthepreviouscommandisrun,theserverwilllistenforincoming

connectionsoneveryinterface,allIPaddressesandthestandardFTPport

在下面的例子中,我们将假定的pure-ftpd”文件位于/usr/local/sbin。

这是默认的如果你编译服务器从源代码tarball。

但正如我前面说过在这个文档,如果你安装了一个二进制包(RPM、DEBSLP,、TGZ),服务器可能安装在/usr/sbin/。

所以只是替换“/usr/local/sbin/pure-ftpd'与'/usr/sbin/pure-ftpd”。

  

前面的命令运行时,服务器将侦听传入连接每个接口上、所有IP地址和FTP端口

Initscurrentform,Pure-FTPdusessomeOS-specificsystemcalls.Andalthough

someportabilityworkhasbeendoneinordertoeaseitsporttoother

operatingsystems,onlyLinuxFreeBSD,NetBSD,OpenBSD,ISOS,MirBSD,BSDi,

DragonflyBSD,Darwin,Solaris,Tru64,Irix,AIXandHPUXareknowntowork,

otheroperatingsystemsmayneedsometweaks.WithLinux,anymodern

distributionshouldbeok.

*Step1(optionalbutrecommended):

Createaspecific,unprivilegeduserandgroupcalled_pure-ftpd,withoutany

validshell.Don'tusethisforanythingelse,includingFTPvirtualusers.

groupadd_pure-ftpd

useradd-g_pure-ftpd-d/var/empty-s/etc_pure-ftpd

Ifhavingauserwhosenamebeginswithanunderscoreisano-goforyou,

youcanalsocallitpure-ftpd,withouttheunderscore.

*Step2:

IfyouhaveCdialogorXdialoginstalledonyoursystem,trythefollowing

commandtobuildandinstallPure-FTPd:

make-fMakefile.gui

Ifyoudon'thaveCdialogorifyouprefertheconventionalway,hereitis:

./configure

makeinstall-strip

Etvoila!

Thesoftwareisnowinstalledin/usr/local/sbin/pure-ftpd

*Step3:

Tolaunchtheserver,justtypethefollowingcommand:

/usr/local/sbin/pure-ftpd&

Ifyouinstalledabinarypackage(RPM,SLP,Debian),maybeusethe

followingcommandinstead:

/usr/sbin/pure-ftpd&

Yourserverisready.Justtype'ftplocalhost'totestit.Ifyouwantto

automaticallyruntheserverwhenthesystemboots,addthepreviouscommand

to/etc/rc.d/rc.localor/etc/rc.d/boot.local.Don'tforgetthe'&'sign.

就其目前的形式来看,Pure-FTPd使用一些特定于操作系统的系统调用。

尽管一些可移植性的工作已经完成,以缓解其港口到其他操作系统,只有LinuxFreeBSD,NetBSD,OpenBSD,ISOS,MirBSD,BSDi,DragonflyBSD、达尔文、Solaris、AIX和Tru64,Irix,已知HPUX工作,其他的操作系统可能需要一些调整。

对于Linux,任何现代分布应该没问题。

*第1步(可选的,但是建议):

  

  创建一个特定的,无特权的用户和组称为_pure-ftpd,没有任何有效的shell。

不要用这个做别的事情,包括FTP的虚拟用户。

  

  groupadd_pure-ftpd

  _pure-ftpduseradd-g-d/var/empty-s/etc_pure-ftpd

  

如果有一个用户的名字开始强调了一个对你不方便,你也可以叫它pure-ftpd,没有下划线。

*第二步:

  

  如果你有Cdialog或Xdialog安装在您的系统上,试试下面的命令来构建和安装Pure-FTPd:

  

  Make-fmakefilegui

  

  如果你没有Cdialog或如果你更喜欢传统的方式,这就是:

  

  ./configure

  makeinstall-strip

  

  果不其然!

软件现在是安装在/usr/local/sbin/pure-ftpd

 *第三步:

  

  启动服务器,只需输入以下命令:

  

  /usr/local/sbin/pure-ftpd&

  

  如果你安装了一个二进制包(RPM,SLP,Debian),也许使用以下命令相反:

  

  /usr/sbin/pure-ftpd&

  

  您的服务器已经准备好了。

只需敲“ftplocalhost'来测试它。

如果你想自动运行服务器在系统启动时,前面的命令添加到/etc/d/rc。

本地或/etc/d/boot。

当地。

不要忘记“&”标志。

--with-everything:

buildabigserverwithalmostallfeaturesturnedon:

altlog,cookies,throttling,ratios,ftpwho,uploadscript,virtualusers

(puredb),quotas,virtualhosts,directoryaliases,externalauthentication,

Bonjourandprivilegeseparation.

--with-everything:

建立一个大型服务器与几乎所有功能打开:

altlog,cookies,throttling,ratios,ftpwho、上传脚本,虚拟用户(puredb)、配额、虚拟主机、目录别名,外部身份验证,卓越和特权分离

'-g':

Changethelocationofthepidfilewhentheserveris

-runinstandalonemode.Thedefaultis/var/run/pure-ftpd.pid.

-改变pid文件的位置当服务器

-在独立模式运行。

默认的是/var/run/pure-ftpd。

pid。

-'-d':

Sendvariousdebuggingmessagestothesyslog.Don'tusethis

unlessyoureallywanttodebugPure-FTPd.Passwordsaren'tlogged.

Duplicate'-d'tologresponses,too.

发送各种调试信息到syslog。

不要使用这个

除非你真的想调试Pure-FTPd。

密码不登录。

也重复“-d”来记录响应

-'-s':

The"waReZprotection".Don'tallowanonymoususerstodownload

filesownedby"ftp"(generally,filesuploadedbyotheranonymoususers).

Sothatuploadshavetobevalidatedbyasystemadministrator(chownto

anotheruser)beforebeingavailablefordownload.

 “盗版软件保护”。

不允许匿名用户下载

  文件属于“ftp”(一般来说,文件上传其他匿名用户)。

  所以,上传必须验证由系统管理员(乔恩来

  另一个用户),然后将其可供下载。

-'-f':

Usethatfacilityforsysloglogging.Itdefaultsto

'ftp'(or'local2'ifyougotanobsoletelibcwithoutthatfacility).

-Loggingcanbedisabledwith'-fnone'

-  使用该工具syslog记录。

它的默认值为

-  “ftp”(或“local2“如果你得到了一个过时的libc没有这种设施)。

-  ——可以禁用日志记录与“-fnone'

-'-l'or'-l:

':

Addsanew

ruletotheauthenticationchain.Pleasereadthe"Authentication"section,

laterinthisREADMEfile.It'sanimportantsection.

 添加一个新规则来验证链。

请阅读“认证”部分,

  后来在这个README文件。

这是一个重要的部分。

-'-j':

Ifthehomedirectoryofauserdoesn'texist,automaticallycreate

it.Thenewlycreatedhomedirectorybelongstotheuserandpermissionsare

setaccordingtothecurrentdirectorymask.Onlythehomedirectorycanbe

created(so/home/john/./public_htmlwon'twork,but/home/johnwill).To

avoidlocalattacks,theparentdirectoryshouldneverbelongtoanuntrusted

user.Alsonotethatyoumusttrustwhoevermanagestheusersdatabases,

becausewiththatfeature,h

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1