嵌入式Linux開發工具中用的較多還有TFTP網絡服務,具體配置如下:
1.檢查在 /etc/ 下有沒有 xinetd.d/ 目錄,沒有的話
sudo apt-get install xinetdsudo apt-get install netkit-inetd
2. sudo apt-get install tftp-hpa tftpd-hpa 安裝服務
3. sudo mkdir /tftp
sudo chmod777 /tftp
4. 打開目錄 /etc/xinetd.d/
新建文件tftp
tftp內容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftp-c //-c決定了能不能上傳
per_source = 11
cps = 100 2
flags = IPv4
}
5. 重新啓動服務:
sudo /etc/init.d/xinetd restart
檢查服務是否開啓
netstat -a |grep tftp
出現下圖的內容:
只要出現 upd 那項就說明服務安裝成功了。
6. 測試配置正確與否
在 /tftp 下新建一個文件 取名爲 1 ,輸入內容 hello tftp!
在終端輸入
cd home/li (li是用戶名)
tftp 192.168.1.100
換成自己的ip
tftp> get 1
如果能夠得到文件,且打開裏面有 hello tftp ! 那麼就成功了。