Debian Linux tftp服務(wù)器配置步驟分析
雖然我們講解過不少關(guān)于tftp服務(wù)器的設(shè)置,但是針對某一個系統(tǒng)版本的具體配置我們講解的并不多。那么這里我們就講解一下Debian Linux tftp服務(wù)器配置的內(nèi)容。我用的系統(tǒng)環(huán)境是debian 5.0。
首先,安裝tftp客戶端和服務(wù)端,因為debian5.0默認(rèn)下是不安裝的
sudo apt-get install tftp tftpd
然后,安裝xinetd,因為默認(rèn)下用的是openbsd-inetd ,而tftp需要xinetd這個網(wǎng)路管理的背景程式的支持
sudo apt-get install xinetd
Debian Linux tftp服務(wù)器配置inetd.conf
將/etc/inetd.conf中關(guān)于tftp的部份注釋刪掉:
- #:BOOT: TFTP service is provided primarily for booting. Most sites
- # run this only on machines acting as "boot servers."
- #tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /home/creater/image #將這句的注刪掉
其中/home/creater/image為你要下載的文件所在的目錄
接下來在/etc/xinetd.d/下新建一個tftp的文件:
- sudo vim /etc/xinetd.d/tftp
Debian Linux tftp服務(wù)器配置中添加如下內(nèi)容:
- service tftp
- {
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s /home/creater/image #替換為你的目錄,注意權(quán)限
- disable = no
- per_source = 11
- cps = 1002
- flags = IPv4
- }
重啟xinetd:
- sudo /etc/init.d/xinetd reload
- sudo /etc/init.d/xinetd restart
測試:
- tftp localhost
- tftp>get u-boot.bin #一開始在image下有u-boot.bin
- Received 97353 bytes in 0.1 seconds
到此,說明Debian Linux tftp服務(wù)器配置已經(jīng)完成了。
轉(zhuǎn)自:http://my.oschina.net/jtihj/blog/1932