Linux FTP 服务器配置简单说明.docx
- 文档编号:2151218
- 上传时间:2022-10-27
- 格式:DOCX
- 页数:10
- 大小:19.19KB
Linux FTP 服务器配置简单说明.docx
《Linux FTP 服务器配置简单说明.docx》由会员分享,可在线阅读,更多相关《Linux FTP 服务器配置简单说明.docx(10页珍藏版)》请在冰豆网上搜索。
LinuxFTP服务器配置简单说明
LinuxFTP服务器配置简单说明
分类:
Linux2011-01-1823:
41 15227人阅读 评论(8) 收藏 举报
linux服务器ftp服务器servicelisttcp
一. FTP 说明
linux 系统下常用的FTP 是vsftp, 即VerySecurityFileTransferProtocol. 还有一个是proftp(Professionftp)。
我们这里也是简单的说明下vsftp的配置。
vsftp提供3种远程的登录方式:
(1)匿名登录方式
就是不需要用户名,密码。
就能登录到服务器电脑里面
(2)本地用户方式
需要帐户名和密码才能登录。
而且,这个帐户名和密码,都是在你linux系统里面,已经有的用户。
(3)虚拟用户方式
同样需要用户名和密码才能登录。
但是和上面的区别就是,这个用户名和密码,在你linux系统中是没有的(没有该用户帐号)
二. Vsftp的安装配置
2.1 安装
vsftp 的安装包,可以在安装里找到。
用yum 安装过程也很简单。
具体参考:
Linux 搭建 YUM 服务器
安装命令:
yuminstallvsftpd
2.2. 相关命令
2.2.1 启动与关闭
[root@singledb~]#servicevsftpdstart
Startingvsftpdforvsftpd:
[ OK ]
[root@singledb~]#servicevsftpdstop
Shuttingdownvsftpd:
[ OK ]
[root@singledb~]#servicevsftpdrestart
Shuttingdownvsftpd:
[FAILED]
Startingvsftpdforvsftpd:
[ OK ]
[root@singledb~]#/etc/init.d/vsftpdstart
Startingvsftpdforvsftpd:
[FAILED]
[root@singledb~]#/etc/init.d/vsftpdstop
Shuttingdownvsftpd:
[ OK ]
[root@singledb~]#/etc/init.d/vsftpdrestart
Shuttingdownvsftpd:
[FAILED]
Startingvsftpdforvsftpd:
[ OK ]
[root@singledb~]#/etc/init.d/vsftpdstatus
vsftpd(pid3931)isrunning...
[root@singledb~]#
2.2.2. 其他命令
--查看vsftpd 启动状态
[root@singledb~]#chkconfig--listvsftpd
vsftpd 0:
off 1:
off 2:
off 3:
off 4:
off 5:
off 6:
off
[root@singledb~]#chkconfig vsftpdon
[root@singledb~]#chkconfig--listvsftpd
vsftpd 0:
off 1:
off 2:
on 3:
on 4:
on 5:
on 6:
off
这里看到,默认情况下从2到5设置为on了。
2到5是多用户级别。
这个对应的是linux不同的运行级别。
我们也可以加level 选项来指定:
[root@singledb~]#chkconfig--level0vsftpdon
[root@singledb~]#chkconfig--listvsftpd
vsftpd 0:
on 1:
off 2:
on 3:
on 4:
on 5:
on 6:
off
我们看到0已经设置为on了。
我们可以使用manchkconfig 来查看帮助:
--levellevels
Specifiestherunlevelsanoperationshouldpertainto.Itis given as astringofnumbersfrom0to7.Forexample,--level35specifiesrunlevels3 and5.
传统的init 定义了7个运行级(runlevel),每一个级别都代表系统应该补充运行的某些特定服务:
(1)0级是完全关闭系统的级别
(2)1级或者S级代表单用户模式
(3)2-5 级 是多用户级别
(4)6级 是 重新引导的级别
关于Linux 的运行级别,在我的Blog:
Linux 开机引导与关机过程(5.1init 和运行级)
(1)查看防火墙
我一般都是把系统的防火墙关闭了。
因为开了会有很多限制。
[root@singledb~]#/etc/init.d/iptablesstatus
Table:
nat
ChainPREROUTING(policyACCEPT)
num target protoptsource destination
ChainPOSTROUTING(policyACCEPT)
num target protoptsource destination
1 MASQUERADE all -- 192.168.122.0/24 !
192.168.122.0/24
ChainOUTPUT(policyACCEPT)
num target protoptsource destination
Table:
filter
ChainINPUT(policyACCEPT)
num target protoptsource destination
1 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udpdpt:
53
2 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcpdpt:
53
3 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udpdpt:
67
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcpdpt:
67
ChainFORWARD(policyACCEPT)
num target protoptsource destination
1 ACCEPT all -- 0.0.0.0/0 192.168.122.0/24 stateRELATED,ESTABLISHED
2 ACCEPT all -- 192.168.122.0/24 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-withicmp-port-unreachable
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-withicmp-port-unreachable
ChainOUTPUT(policyACCEPT)
num target protoptsource destination
Youhavenewmailin/var/spool/mail/root
--添加开放21号端口:
[root@singledb~]#/sbin/iptables-IINPUT-ptcp--dport21-jACCEPT
[root@singledb~]# /etc/init.d/iptablesstatus
Table:
nat
ChainPREROUTING(policyACCEPT)
num target protoptsource destination
ChainPOSTROUTING(policyACCEPT)
num target protoptsource destination
1 MASQUERADE all -- 192.168.122.0/24 !
192.168.122.0/24
ChainOUTPUT(policyACCEPT)
num target protoptsource destination
Table:
filter
ChainINPUT(policyACCEPT)
num target protoptsource destinat
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Linux FTP 服务器配置简单说明 服务器 配置 简单 说明
![提示](https://static.bdocx.com/images/bang_tan.gif)