本文主要向大家介绍了Linux运维知识之linux上搭建ftp、vsftp, 解决访问ftp超时连接等问题,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助。
linux上搭建ftp
重要 解决如何搭建ftp
解决用户指定访问其根目录
解决访问ftp超时连接
解决ftp主动连接、被动连接的问题
1、安装ftp
安装ftp前,先把防火墙关闭
#service iptables stop (挺重要)
安装好后再根据需要的端口 添加到 iptables
直接用yum安装 vsftp
# 1.执行以下安装命令
yum install -y vsftpd
# 2.设置开机启动服务
chkconfig vsftpd on
# 3.启动服务
service vsftpd start
配置 ftp 配置文件
这里只是简单的介绍几个必须的配置,具体用到的配置自己去配
#默认的配置文件是/etc/vsftpd/vsftpd.conf
vi /etc/vsftpd/vsftpd.cof
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd‘s
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO #是否允许匿名登录
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local us