CentOS 7下安装配置proftpd搭建ftp服务器的详细教程
proftpd全称:ProfessionalFTPdaemon,是针对Wu-FTP的弱项而开发的,除了改进的安全性,还具备许多Wu-FTP没有的特点,能以Stand-alone、xinetd模式运行等。ProFTP已经成为继Wu-FTP之后最为流行的FTP服务器软件,越来越多的站点选用它构筑安全高效的FTP站点,ProFTP配置方便,并有MySQL和Quota模块可供选择,利用它们的完美结合可以实现非系统账号的管理和用户磁盘的限制。<摘抄百度百科>
本章通过下载源码的方式安装,可以到官网下载最新版本:http://www.proftpd.org/
1、首先安装lrzsz方便拷贝文件到要搭建服务器的linux路径下
yuminstalllrzsz
2、上传文件解压
将下载完成的proftpd-1.3.6.tar.gz文件上传到指定路径,使用tarzxvfproftpd-1.3.6.tar.gz解压
3、由于使用源码安装,所以需要安装gcc编译环境
yuminstallgccgcc-c++autoconfautomake
3、配置并制定安装和配置文件路径
./configure--prefix=/usr/local/proftpd--sysconfdir=/usr/local/proftpd
4、安装
make&makeinstall
5、修改配置文件,限制匿名用户可以上传下载,但是不能删除(本章暂不详细描述权限控制部分内容)
vi/usr/local/proftpd/proftpd.conf #ThisisabasicProFTPDconfigurationfile(renameitto #'proftpd.conf'foractualuse.Itestablishesasingleserver #andasingleanonymouslogin.Itassumesthatyouhaveauser/group #"nobody"and"ftp"fornormaloperationandanon. ServerName"WelcometoFTPServer" ServerTypestandalone DefaultServeron #Port21isthestandardFTPport. Port21 #Don'tuseIPv6supportbydefault. UseIPv6off #Umask022isagoodstandardumasktopreventnewdirsandfiles #frombeinggroupandworldwritable. Umask022 #TopreventDoSattacks,setthemaximumnumberofchildprocesses #to30.Ifyouneedtoallowmorethan30concurrentconnections #atonce,simplyincreasethisvalue.NotethatthisONLYworks #instandalonemode,ininetdmodeyoushoulduseaninetdserver #thatallowsyoutolimitmaximumnumberofprocessesperservice #(suchasxinetd). MaxInstances30 #Settheuserandgroupunderwhichtheserverwillrun. Usernobody Groupnobody #TocauseeveryFTPusertobe"jailed"(chrooted)intotheirhome #directory,uncommentthisline. #DefaultRoot~ #Normally,wewantfilestobeoverwriteable. AllowOverwriteon IdentLookupsoff UseReverseDNSoff #BaruseofSITECHMODbydefaultAllowAll #Abasicanonymousconfiguration,nouploaddirectories.Ifyoudonot #wantanonymoususers,simplydeletethisentire section. Userftp Groupftp #Wewantclientstobeabletologinwith"anonymous"aswellas"ftp" UserAliasanonymousftp #Limitthemaximumnumberofanonymouslogins MaxClients50 #Wewant'welcome.msg'displayedatlogin,and'.message'displayed #ineachnewlychdireddirectory. DisplayLoginwelcome.msg DisplayChdir.message #LimitWRITEeverywhereintheanonymouschroot DenyAll
6、关闭防火墙
systemctlstopfirewalld.service systemctldisablefirewalld.service
7、启动服务器
/usr/local/proftpd/sbin/proftpd
查看进程是否已经启动
[root@localhost~]#ps-ef|grepproftpd nobody11401012:13?00:00:00proftpd:(acceptingconnections) root31822270012:50pts/000:00:00grep--color=autoproftpd
8、添加到启动项避免每次重启后都需要手动启动
vi/etc/rc.d/rc.local #!/bin/bash #THISFILEISADDEDFORCOMPATIBILITYPURPOSES # #Itishighlyadvisabletocreateownsystemdservicesorudevrules #torunscriptsduringbootinsteadofusingthisfile. # #Incontrasttopreviousversionsduetoparallelexecutionduringboot #thisscriptwillNOTberunafterallotherservices. # #Pleasenotethatyoumustrun'chmod+x/etc/rc.d/rc.local'toensure #thatthisscriptwillbeexecutedduringboot. touch/var/lock/subsys/local /usr/local/proftpd/sbin/proftpd
由于在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要加上可执行的权限:
chmod+x/etc/rc.d/rc.local
总结
以上所述是小编给大家介绍的CentOS7下安装配置proftpd搭建ftp服务器的详细教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:czq8825#qq.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。