安装

1
sudo apt install tftpd-hpa 

配置tftp服务

修改tftpd-hpa

1
vim /etc/default/tftpd-hpa   
1
2
3
4
5
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/tci/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure -l -c -s"

重启tftp服务

1
systemctl restart tftpd-hpa

查看状态

1
systemctl status tftpd-hpa
1
2
3
4
5
6
7
8
9
10
11
12
13
● tftpd-hpa.service - LSB: HPA's tftp server
Loaded: loaded (/etc/init.d/tftpd-hpa; generated)
Active: active (running) since Thu 2023-06-01 10:58:07 CST; 4 days ago
Docs: man:systemd-sysv-generator(8)
Tasks: 1 (limit: 4567)
Memory: 51.9M
CGroup: /system.slice/tftpd-hpa.service
└─107855 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure -l -c -s /var/tci/tftp

6月 01 10:58:07 vm systemd[1]: Starting LSB: HPA's tftp server...
6月 01 10:58:07 vm tftpd-hpa[107847]: * Starting HPA's tftpd in.tftpd
6月 01 10:58:07 vm tftpd-hpa[107847]: ...done.
6月 01 10:58:07 vm systemd[1]: Started LSB: HPA's tftp server.