如何爲windows2000創建一個tftp service

 Windwos 2000在默認情況下TFTP服務是沒有安裝的,只有在使用RIS服務的時候才
會安裝該服務(使用RIS服務的人很少),現在我給大家示範如何來安裝一個tftp
服務(如果你有需要的話)。

我們首先找到系統中的tftpd.exe文件,一般我們可以在%systemroot%/system32/dllcache目錄下找到該文 件
(Windows 2000 Server中文版),建議把該文件copy到其他目錄。

C:/>copy %systemroot%/system32/dllcache/tftpd.exe %systemroot%/system32
已複製         1 個文件。

我們會用Windows 2000下的Resource Kits中的一個工具instsrv創建一個服務,instsrv的用法如下,當然,
你也可以用其他的工具來實現(如srvinstw,GUI方式的)。
C:/>instsrv
Installs and removes system services from NT

INSTSRV <service name> (<exe location> | REMOVE)
  [-a <Account Name>] [-p <Account Password>]

  Install service example:

    INSTSRV MyService C:/MyDir/DiskService.Exe
    -OR-
    INSTSRV MyService C:/mailsrv/mailsrv.exe -a MYDOMAIN/joebob -p foo

  Remove service example:

    INSTSRV MyService REMOVE

添加一個服務,注意,該服務創建侯爲自動啓動。
C:/>instsrv tftp c:/winnt/system32/tftpd.exe
The service was successfuly added!

Make sure that you go into the Control Panel and use
the Services applet to change the Account Name and
Password that this newly installed service will use
for its Security Context.

啓動服務
C:/>net start tftp
tftp 服務正在啓動 .
tftp 服務已經啓動成功。

測試服務是否正常工作
C:/>tftp -i 61.135.21.195 PUT sometips.gif adam.gif
Transfer successful: 4209 bytes in 1 second, 4209 bytes/s

C:/>dir tftpdroot
驅動器 C 中的卷是 C
卷的序列號是 1E23-1907

C:/tftpdroot 的目錄

2001-09-22  01:14       <DIR>          .
2001-09-22  01:14       <DIR>          ..
2001-09-22  01:14                4,209 adam.gif
               1 個文件          4,209 字節
               2 個目錄     94,113,792 可用字節

注意,如果你上傳文件,系統會在%systemdrive%自動創建一個名爲tftproot的目錄,
這樣你的工作就完成了,你的Windows2000可以作爲一個TFTP服務器了。

附註:如何禁用WINDOWS自帶的TFTP客戶端呢?

 用文本編輯工具打開%systemroot%/system32/drivers/etc 下的services文件,找到tftp對應的那一行,將69/udp換成0/udp即可~保存退出

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章