Ubuntu 14.04中安装tftp

1. 安装
sudo apt-get install tftp-hpa tftpd-hpa

2. 建立目录
sudo mkdir /tftpboot
sudo chmod 0777 /tftpboot
sudo touch test1.txt

3. 配置
sudo vi /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s" # -c允许上传文件,-s是指定服务目录。

4. 重启服务
sudo service tftpd-hpa restart

5. 测试
cd ~
tftp localhost
tftp>get test1.txt
tftp>put test2.txt
tftp>q
退出后,在当前目录下会有一个test1.txt文件,在/tftpboot目录下有test2.txt,表示tftp服务器安装成功!

 

posted @ 2018-05-18 20:38  船长博客  阅读(175)  评论(0编辑  收藏  举报
永远相信美好的事情即将发生!