1
环境准备 准备两台Centos6服务器,1台Centos7服务器 系统: Centos6.8,Centos7.3 内存:1G cpu: 2核 IP地址: 10.0.0.22 10.0.0.23 10.0.0.41 # 安装ftp服务,在22上操作 yum -y install vsftpd # 启动ftp服务 service vsftpd start 访问测试页面 在23上操作 yum -y install lftp lftp 10.0.0.22 # 在22上操作 cd /var/ftp/ # 创建文件 touch 1.txt # 编辑文件 vim 1.txt # 随便输入点内容 hello ftp ! # 在23上操作 [ root@ localhost ~ ] # lftp 10.0.0.22 lftp 10.0.0.22:~ > ls -rw-r--r-- 1 0 0 11 Nov 21 04:32 1.txt drwxr-xr-x 2 0 0 4096 Mar 22 2017 pub # 切换文件至opt目录 lftp 10.0.0.22:/ > lcd /opt lcd ok, local cwd = /opt # 查看路径 lftp 10.0.0.22:/ > lpwd /opt lftp 10.0.0.22:/ > # 下载文件 get 1.txt # 退出当前环境