1. 程式人生 > >Ubuntu 14.04中安裝tftp

Ubuntu 14.04中安裝tftp

sudo nbsp rect chm tft get rec tftpboot ubunt

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