1.sudo apt-get install ftp tftpd xinetd
2.cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot
vim test ------这里打开一个test文件,在里面输入一些信息
在xinetd中建立一个服务,新建一个文档
sudo vim /etc/xinetd.d/tftp
输入以下内容
service tftp
{
disable =no
socket_type = dgram
protocol =udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot -c
per_source =11
cps =100 2
}
3.然后sudo service xinetd restart
记得要sudo权限执行,否则会无法get或put
4.随便进入一个有可读写权限的目录,测试一下:
tftp localhost
> get test
>q
get test是获取tftpboot里面的test文件