歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu中配置tftp,燒寫內核用

Ubuntu中配置tftp,燒寫內核用

日期:2017/2/28 16:59:21   编辑:Linux教程

1、安裝相關軟件包
sudo apt-get install tftpd (服務端)
sudo apt-get install tftp (客戶端)
sudo apt-get install xinetd

2、建立配置文件
cd /etc/xinetd.d/
sudo vim tftp
輸入
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

存盤退出

3、建立tftp服務文件目錄
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot -R

4、從新啟動服務
sudo /etc/init.d/xinetd restart
安裝完成!

測試:
/nfsroot/rootfs/button$ tftp 192.168.2.75
tftp> put hello.c
Sent 1018 bytes in 0.0 seconds
tftp> get hello.c
Received 1018 bytes in 0.1 seconds
tftp> put book.c
Sent 1980 bytes in 0.0 seconds
tftp> get book.c
Received 1980 bytes in 0.0 seconds

注: nfsroot/rootfs/button預先有hello.c book.c

Copyright © Linux教程網 All Rights Reserved