码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 14.04中安装tftp

时间:2018-05-18 21:19:21      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:服务器   art   退出   address   direct   mod   dir   一个   username   

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服务器安装成功!

 

Ubuntu 14.04中安装tftp

标签:服务器   art   退出   address   direct   mod   dir   一个   username   

原文地址:https://www.cnblogs.com/v5captain/p/9057945.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!