1、安装 FTP
# CentOS 7 : yum - y install vsftpd
# Ubuntu: apt- get install vsftpd
2、创建 FTP 默认目录,用于存放升级文件
# ll / home/ ftp/
total 60180
drwxrwxrwx 2 ftp ftp 4096 May 19 19 : 48 . /
drwxr- xr- x 6 root root 4096 May 19 18 : 37 . . /
- rw- rw-- -- 1 bp bp 61612896 May 19 14 : 24 MSG2200E - 4 V_SYSTEM_3. 20.261 _20200430. bin
3、编辑配置文件
# 备份原配置文件
root@ubuntu: ~ # mv / etc/ vsftpd. conf / etc/ vsftpd. conf. bak
# 编辑配置文件,直接复制以下配置内容即可
root@ubuntu: ~ # vi / etc/ vsftpd. conf
root@ubuntu: ~ # cat / etc/ vsftpd. conf
local_root= / home/ ftp
anon_root= / home/ ftp
anonymous_enable= NO
local_enable= YES
write_enable= YES
local_umask= 022
dirmessage_enable= YES
xferlog_enable= YES
connect_from_port_20= YES
xferlog_std_format= YES
tcp_wrappers= YES
listen= YES
pam_service_name= vsftpd
chroot_local_user= YES
chroot_list_enable= YES
chroot_list_file= / etc/ vsftpd/ chroot_list
# 按需创建用户列表
root@ubuntu: ~ # cat / etc/ vsftpd/ chroot_list
bp
ftptest
4、重启服务
root@ubuntu: / home/ ftp# service vsftpd restart
root@ubuntu: / home/ ftp# service vsftpd status
● vsftpd. service - vsftpd FTP server
Loaded: loaded ( / lib/ systemd/ system/ vsftpd. service; enabled; vendor preset: enabled)
Active: active ( running) since Wed 2020 - 05 - 20 12 : 08 : 40 HKT ; 3 s ago
Process: 9724 ExecStartPre= / bin/ mkdir - p / var / run/ vsftpd/ empty ( code= exited, status= 0 / SUCCESS )
Main PID : 9727 ( vsftpd)
Tasks: 1
Memory: 424.0 K
CPU : 6 ms
CGroup: / system. slice/ vsftpd. service
└─9727 / usr/ sbin/ vsftpd / etc/ vsftpd. conf
May 20 12 : 08 : 40 ubuntu systemd[ 1 ] : Starting vsftpd FTP server...
May 20 12 : 08 : 40 ubuntu systemd[ 1 ] : Started vsftpd FTP server.
5、企业网关下载升级镜像文件
# 可下载成功,能正常使用
host# copy ftp bp passwd 11.240 .240 .2 MSG2200E - 4 V_SYSTEM_3. 20.261 _20200430. bin image
Start download, please waitting
Erasing 128 Kibyte @ 20000 -- 100 % complete
Writing at 0x00000000
Writing at 0x00020000
Download image ( MSG2200E - 4 V_SYSTEM_3. 20.261 _20200430. bin) success!