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

Ubuntu 16.04中安裝tftp

-c 安裝 tp服務器 htm strong option apt-get ref itl

引用自:https://www.linuxidc.com/Linux/2016-07/133255.htm Ubuntu 16.04中安裝tftp 1. 安裝 $ apt-get install tftp-hpa tftpd-hpa 2. 建立目錄 $ mkdir /tftpboot # 這是建立tftp傳輸目錄。 $ sudo chmod 0777 /tftpboot $ sudo touch test.txt # test.txt文件最好輸入內容以便區分 3. 配置 # vi /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" # 這裏是你的tftpd-hpa的服務目錄,這個想建立在哪裏都行 TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="-l -c -s" # 這裏是選項,-c是可以上傳文件的參數,-s是指定tftpd-hpa服務目錄,上面已經指定 4. 重啟服務
$ sudo service tftpd-hpa restart # 啟動服務,這裏要註意,采用的獨立服務形式。 5. 測試 # cd /home # tftp localhost #localhost 表示本機 tftp>get test.txt //test.txt 是之前在 /tftpboot 目錄下新建的文件 tftp>put test1.txt //test1.txt 是在 /home 目錄下新建的文件 tftp>q 退出後,在/home目錄下會有一個test.txt文件,在/tftpboot 目錄下有test1.txt,表示tftp服務器安裝成功!

Ubuntu 16.04中安裝tftp