服务端设置
- 关闭防火墙清空规则组
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
echo "Firewalld is stopped and disabled."
- 下载ftp服务并启动
yum -y install vsftpd
systemctl start vsftpd.service
- 创建测试文件
toouch /var/ftp/testftp.txt
echo "testftplsls" > testftp.txt
- 测试访问
![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/a43ed541672143c78904e2f9e95edd88.png)
客户端配置
- lftp
yum -y install lftp
[root@localhost /]
lftp 124.70.xxx.xxx:~> get testftp.txt
12 bytes transferred
lftp 124.70.xxx.xxx:/> exit
- wget
[root@localhost /]
后面 -O 可指定目录
- 上传文件
cd /etc/vsftpd
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.back
vim vsftpd.conf
anon_upload_enable=YES
anon_mkdir_write_enable=YES
mkdir /var/ftp/upload
chmod 777 /var/ftp/upload/
systemctl restart vsftpd
lftp 124.70.xxx.xxx
cd /upload
put xxx
完成