1.安装对应的软件包
$ sudo apt-get install xinetd tftpd tftp
2.tftpd是挂载在xinetd下面的,修改配置文件
$ sudo vim /etc/xinetd.d/tftp
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
3.重新启动xinetd服务
$ sudo /etc/init.d/xinetd restart
4.测试
$ sudo chmod 777 /tftpboot
$ touch /tftpboot/test.txt
$ chmod 777 /tftpboot/test.txt && cd /tftpboot
$ tftp localhost
>put test.txt