天天看點

如何為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即可~儲存退出

繼續閱讀