我知道我在这里错过了一些简单的东西。 我试图在我的Centos 4.8服务器上安装/运行TFTP服务器。 我做了以下几点:
1)以root身份对shell进行身份validation。
2)安装tftp-server: yum install tftp-server (xinetd已经安装了btw)
3)编辑/etc/xinetd.d/tftp并设置disable = no
# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. 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 }
4)重新启动xinetd: service xinetd restart
5)设置目录权限: chmod 777 / tftpboot
6)确保服务在重启时启动: chkconfig tftp on
7)确保xinetd在重启时启动: chkconfig xinetd on
tftp服务器似乎并没有启动,但不知道为什么。 我没有得到任何错误,但我没有看到它在本地netstat结果中的端口69上监听,我不能从tftp客户端连接。
我在这里错过了什么?
更新谢谢你所有的帮助人。 我想我已经开始在这里看到根本原因–xinetd似乎没有运行或开始。
[root@server ~]# service xinetd restart [root@server ~]#
我已经删除了tftp服务器,然后删除xinetd …用yum(xinetd第一次)重新安装它们,但我仍然得到相同的错误。 有没有我可以检查xinet的日志?
在服务器的参数你有-s / tftpboot,但在你的post你说你使用的目录是/ tftpserver。 -s和path表示您用作TFTP根目录的目录。 将其更改为您要使用的path或目录。
如果/ tftpboot不存在,你会在/ var / log / messages中看到一个错误,守护进程实际上不会启动。
我会抛弃它,有利于atftp 。
configuration更简单,function更强大,执行正确的日志logging,而不依赖于inetd。
(包括:点头Zoredcache的评论)
你有没有先创build文件? 在我的cisco备份中,我没有chmod 777整个目录,我先创build文件然后chmod 666这个文件。 然后我可以写信给它。
尝试这个:
触摸testfile.txt
chmod 666 testfile.txt
然后将文件传输到tftp服务器。 这是假设你正在试图把文件放到tftp服务器上。
你不会看到tftp在69端口上,你会看到xinetd。 我并不期望解决你的问题,但无论如何,为了历史的缘故,我正在注意它;-)
无论如何,有些事情要检查
哦,为了神的爱:不要chmod 777或666的东西,这是重要的/ tftpboot。