配置tftp服務

來源:互聯網
上載者:User

嵌入式linux的tftp開發 環境包括兩個方面:一是嵌入式linux宿主機的 tftp-server支援,二是嵌入式linux目標機的tftp-client支援。因為u-boot本身內建支援tftp-client,所以嵌入 式目標機就不用配置了。下面就詳細介紹一下linux宿主機tftp-server的安裝配置。

(1)安裝

        SuSE Linux使用自己帶的YaST進行軟體包的安裝,具體安裝方法不在介紹。

(2)修改檔案

       在linux 下,不管使用的是哪一種super-server,inetd或者xinetd,預設情況下TFTP服務是禁用的,所以要修改檔案來開啟服務。根據(1) 的安裝方法,可以修改檔案/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 /tftpboot -c //tftp根目錄
      per_source = 11
     cps = 100 2
}

(3)建立tftp根目錄,啟動tftp-server。

#mkdir /tftpboot

#chmod o+w /tftpboot

#rcxinetd restart

這樣,tftp-server就啟動了。

(4)配置防火牆

同樣適用YaST工具進行防火牆的設定。

(5)測試命令

#tftp your-ip-address

tftp>get <download file>

tftp>put <upload file>

tftp>q

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.