HOWTO TFTP Server

在 redhat, scientificlinux 內必須安裝 tftp 和 tftp-server 套件. 可用 yum install tftp tftp-server安裝.

然後編輯 /etc/xinetd.d/tftp 檔案. 把 disable = yes 改成 no.

service tftp
{
disable = no
socket_type             = dgram
protocol                = udp
wait                    = yes
user                    = root
server                  = /usr/sbin/in.tftpd
server_args             = -s /tftpboot
per_source              = 11
cps                     = 100 2
flags                   = IPv4
}

然後成重新啟動 xientd.

service xinetd restart

如果要開機後每次都啟動, 記得執行下列指令:

chkconfig tftp on

如果你有防火牆也別忘記打開 tftp udp port

-A RH-Firewall-1-INPUT -p udp -m state –state NEW -m udp –dport 69 -j ACCEPT

如果有用 hosts.allow & hosts.deny也別忘記設定 tftpd允許的來源 ip

in.tftpd:       192.168.1.

按照上列程序已經架設完成 tftp server.

然後放檔案到 /tftpboot 做測試 以檢查 tftp server 是否正常運作.

假設, tftp server 的名稱為 server1, 然後在 tftpboot目錄有個 test.txt檔案.可用下列方式進行驗證 tftp server.

[root@server1 ~]#tftp server1

tftp>get test.txt

tftp>quit

在檢查那個test.txt檔案是否有成功下載回該工作目錄.

參考 : http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch16_:_Telnet,_TFTP,_and_xinetd#TFTP

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.