您的位置:首页 > 编程语言 > PHP开发

如何为windows2000创建一个tftp service

2006-07-21 15:19 615 查看
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即可~保存退出
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: