• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux FTP

主机教程 Liam 1年前 (2019-06-14) 618次浏览 24个评论 扫描二维码
文章目录[隐藏]

很多用户不知道怎么搭建Linux FTP,今天VPS234为大家讲解下Linux Centos 7 搭建FTP的教程。之前为了在Linux 上搭建FTP,以为会像windows一样简便,结果根据网上的教程各种问题,最终还是弄好了,所以弄了个总结,写了这篇使用Linux Centos 7搭建FTP的新手教程,希望可以帮助到需要使用Linux 搭建FTP的朋友,废话不多说,下面我们一步步来。

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

首先肯定是连接上Linux 了,至于连接Linux的方法可以参考Linux VPS远程连接新手教程,这里就不赘述了。

这次我们使用的是 vsftpd来搭建FTP,使用的Linux版本是Centos 7,其他Linux版本类似的。

1、安装vsftpd

首先使用下面的命令安装vsftpd:

yum install vsftpd -y

安装vsftpd完成后如下图所示:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

2、创建FTP账号

vsftpd 安装完成后需要创建FTP账号我们才能连上,创建FTP账号命令的格式如下:

useradd -d 设置ftp目录 FPT账号名称

这里我根据上面的格式使用的命令如下所示:

useradd -d /ftp ftptest1

上面命令的意思就是将”/fpt”目录作为根目录,对应的账号是”ftptest1″

执行效果如下图所示:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

光创建用户名还不行,还需要给用户设置密码,命令格式如下所示:

>passwd 需要设置密码的用户的用户名

这里我们执行的命令如下所示:

passwd ftptest1

执行命令后输入设置的密码,并确认输入一遍,如下图所示:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

3、设置selinux 保证上传下载权限

上面的账号创建后就可以登录了,但是你会发现无法上传文件或者下载文件,因为selinux,这里我们需要设置权限,分别执行下面的命令:

开启FTP全权限

setsebool -P allow_ftpd_full_access on

开启FTP根目录权限

setsebool -P tftp_home_dir on

重启FPT使配置生效

service vsftpd restart

完成上面的命令后,那么FTP就可以上传或者下载文件了,如下图所示命令执行效果:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

4、使用FPT工具连接FTP

上面的配置完成后,我们就可以测试能否连接FTP了,这里我使用的是FileZilla FTP连接客户端,填写前面我们设置好的FTP账号信息,如下图所示:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

然后点击“连接”后,看到成功连接到我们设置的FTP了,有个”fpt”目录就是我们之前设置的,如下图所示:

Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux  FTP

Linux Centos 搭建FTP教程总结

以上就是VPS234为大家总结的Linux Cento搭建FPT教程,这个方法本来很简单的,被网上很多教程误导来误导去走了很多弯路,所以这里总结写下来希望可以帮助到需要使用Linux Centos 搭建FTP的朋友,其他Linux 版本搭建FPT的过程是类似的只是可能比如Ubuntu安装的命令不一样,过程都是几乎一样的。


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Linux CentOS 7 搭建FTP新手教程,图文示例使用vsftpd轻松搭建Linux FTP
喜欢 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(24)个小伙伴在吐槽
  1. Thanks , I have just been searching for information about this topic for ages and yours is the best I've found out till now. But, what about the bottom line? Are you certain concerning the source?
    braziliandiploma.net2020-09-10 23:01 回复 Linux | Firefox浏览器 60.0.2
  2. Excellent blog here! Additionally your web site a lot up very fast! What host are you the use of? Can I get your affiliate link on your host? I want my site loaded up as fast as yours lol
    what is an essay outline2020-09-10 05:34 回复 Mac OS X | Chrome 63.0.3239.132
  3. Hello! I've been reading your web site for some time now and finally got the courage to go ahead and give you a shout out from Atascocita Texas! Just wanted to say keep up the fantastic work!
    black mass2020-08-31 11:20 回复 Linux | Firefox浏览器 2.0.0.6
  4. Good day! I know this is kinda off topic however , I'd figured I'd ask. Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa? My site goes over a lot of the same subjects as yours and I think we could greatly benefit from each other. If you are interested feel free to shoot me an email. I look forward to hearing from you! Fantastic blog by the way!
    black mass2020-08-28 22:19 回复 Linux | Firefox浏览器 60.0.2
  5. Hey there! I've been following your site for a while now and finally got the courage to go ahead and give you a shout out from Porter Texas! Just wanted to mention keep up the excellent work!
    cheap flights2020-08-27 19:02 回复 Mac OS X | Chrome 66.0.3359.181
  6. I do not even know how I stopped up here, however I believed this put up was good. I don't understand who you are however certainly you're going to a famous blogger in case you aren't already. Cheers!
    web hosting sites2020-08-25 18:07 回复 Linux | Firefox浏览器 2.0.0.2
  7. It is the best time to make some plans for the future and it's time to be happy. I have read this put up and if I may I wish to recommend you some fascinating issues or tips. Maybe you could write next articles referring to this article. I desire to learn even more issues approximately it! 3gqLYTc cheap flights
    cheap flights2020-08-25 11:36 回复 Linux | Chrome 52.0.2777.35
  8. What's up every one, here every one is sharing these familiarity, thus it's pleasant to read this website, and I used to visit this webpage all the time. 2CSYEon cheap flights
    cheap flights2020-08-25 08:33 回复 Linux | Chrome 67.0.3396.87
  9. Very nice article. I absolutely love this site. Keep it up! cheap flights yynxznuh
    cheap flights2020-08-24 22:53 回复 Mac OS X | Firefox浏览器 62.0
  10. Yes! Finally something about cheap flights.
    cheap flights2020-08-24 10:50 回复 Mac OS X | Chrome 66.0.3359.139
  11. I got this site from my friend who shared with me concerning this web page and now this time I am visiting this web page and reading very informative articles or reviews at this place.
    hosting services2020-08-10 14:44 回复 Mac OS X | Chrome 66.0.3359.181
  12. If you are going for best contents like me, only pay a visit this web site all the time because it presents quality contents, thanks
    web host2020-08-07 15:18 回复 Mac OS X | Firefox浏览器 59.0
  13. Hello! I just wanted to ask if you ever have any problems with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no data backup. Do you have any solutions to protect against hackers?
    web hosting services2020-08-07 01:56 回复 Linux | Chrome 66.0.3349.0
  14. It's perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you few interesting things or advice. Maybe you can write next articles referring to this article. I desire to read more things about it!
    website hosting services2020-08-06 03:06 回复 Linux | Chrome 66.0.3359.181
  15. I truly love your website.. Very nice colors & theme. Did you build this site yourself? Please reply back as I'm wanting to create my own blog and would love to know where you got this from or just what the theme is called. Thank you!
    cheap flights to florida jetblue2020-07-31 09:21 回复 Linux | Firefox浏览器 2.0.0.2
  16. Wow, this article is nice, my younger sister is analyzing these things, therefore I am going to convey her. adreamoftrains web hosting
    adreamoftrains best website hosting2020-07-30 19:14 回复 Linux | Chrome 66.0.3349.0
  17. Great post. I used to be checking constantly this blog and I am inspired! Extremely useful information specifically the final phase : ) I maintain such info much. I used to be looking for this certain info for a very lengthy time. Thanks and best of luck.
    content hosting2020-07-27 06:33 回复 Linux | Chrome 65.0.3325.183
  18. I am actually happy to read this blog posts which carries lots of useful data, thanks for providing these information.
    web hosting services2020-07-23 12:46 回复 Linux | Chrome 66.0.3359.117
  19. It's an remarkable article in favor of all the online people; they will obtain benefit from it I am sure.
    website hosting2020-07-22 07:55 回复 Linux | Chrome 66.0.3359.158
  20. Link exchange is nothing else but it is simply placing the other person's weblog link on your page at proper place and other person will also do similar in favor of you.
    best web hosting 20202020-07-18 11:40 回复 Linux | Firefox浏览器 56.0.4
  21. Very nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I hope you write again soon!
    best web hosting2020-07-16 19:42 回复 Linux | Chrome 66.0.3359.170
  22. Awesome things here. I am very glad to peer your post. Thanks a lot and I am taking a look ahead to contact you. Will you please drop me a mail?
    tinyurl.com2020-06-27 08:06 回复 未知操作系统 | Chrome 65.0.3325.209
  23. Greate post. Keep posting such kind of info on your page. Im really impressed by your blog. Hi there, You have done a great job. I will certainly digg it and in my view recommend to my friends. I'm confident they will be benefited from this website.
    tinyurl.com2020-06-26 20:39 回复 未知操作系统 | Chrome 38.0.2125.102
  24. Do you have any video of that? I'd like to find out some additional information.
    rsacwgxy g2020-06-22 08:54 回复 Windows 8.1 | Chrome 66.0.3359.139