ftp使用(本地centos搭配云服务器)


安装ftp客户端和服务器端

本地centos 6
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)



配置ftp服务器

设置防火墙命令

service iptables status //查看防火墙状态
service iptables stop //关闭防火墙
service iptables start //开启防火墙
service iptables restart //重启防火墙
ftp使用(本地centos搭配云服务器)
防火墙处于开启状态,只开启了22端口。
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)


设置防火墙开启21端口(ftp命令端口)

切换目录:cd /etc/sysconfig
打开文件:vi iptables
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)


设置防火墙开启高端端口

ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)

重启操作系统看刚才的配置是否生效:
ftp使用(本地centos搭配云服务器)

ok!


关闭selinux( Linux 的一个安全子系统)

ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)


vsftpd服务

ftp使用(本地centos搭配云服务器)



ftp命令

操作命令

本地客户端操作命令:
切换目录:lcd xxx
其他命令使用前加一个
ftp使用(本地centos搭配云服务器)

服务器端命令正常操作。


本地连远程

登录ftp服务器:
本地虚拟机登录远程服务器上的ftp服务器
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)

本地下载服务器上的文件:
ftp使用(本地centos搭配云服务器)

结果:
ftp使用(本地centos搭配云服务器)
ftp使用(本地centos搭配云服务器)

本地上传文件到服务器:
ftp使用(本地centos搭配云服务器)

结果:
ftp使用(本地centos搭配云服务器)

退出ftp:
ftp使用(本地centos搭配云服务器)


远程连本地

本地做服务器端,开启ftp服务器
ftp使用(本地centos搭配云服务器)

查看本地IP地址
ftp使用(本地centos搭配云服务器)

云服务器做ftp客户端连接本地ftp服务器端
ftp使用(本地centos搭配云服务器)


ftp使用(本地centos搭配云服务器)