首页 > 技术知识 > 正文

1.首先使用如下命令安装:

sudo yum install tftp-server

2.修改配置文件

首先修改目录权限并修改目录权限: sudo chmod a+x /etc/xinetd.d sudo vim /etc/xinetd.d/tftp service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot #此为你的tftpserver目录,你可以自己修改也可以使用默认的 disable = on per_source = 11 cps = 100 2 flags = IPv4 }

3.启动tftp服务

sudo systemctl start tftp.service

报错:

Job for tftp.service failed. See systemctl status tftp.service and journalctl -xn for details.

4.执行 journalctl -xn可获得更多的的错误信息

[goodman@Fdeora images]$ journalctl -xn

— Logs begin at 五 2013-11-08 14:15:49 CST, end at 二 2013-11-12 18:33:01 CST. —

11月 12 18:32:59 xFdeora systemd[1]: Started Fingerprint Authentication Daemon.

— Subject: Unit fprintd.service has finished start-up

— Defined-By: systemd

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit fprintd.service has finished starting up.

— The start-up result is done.

11月 12 18:32:59 xFdeora dbus-daemon[427]: dbus[427]: [system] Successfully activated service net.reactivated.Fprint

11月 12 18:32:59 xFdeora fprintd[21722]: Launching FprintObject

11月 12 18:32:59 xFdeora fprintd[21722]:

Message: D-Bus service launched with name: net.reactivated.Fprint

11月 12 18:32:59 xFdeora fprintd[21722]:

Message: entering main loop

11月 12 18:33:01 xFdeora sudo[21721]: lwx : TTY=pts/1 ; PWD=/home/lwx/workspace/product-publish/nvr/images ; USER=root ; COMMAND=/sbin/service tftp start

11月 12 18:33:01 xFdeora systemd[1]: Starting Tftp Server…

— Subject: Unit tftp.service has begun with start-up

— Defined-By: systemd

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit tftp.service has begun starting up.

11月 12 18:33:01 xFdeora systemd[1]: tftp.service failed to run start task: Invalid argument

11月 12 18:33:01 xFdeora systemd[1]: Failed to start Tftp Server.

— Subject: Unit tftp.service has failed

— Defined-By: systemd

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d

— Unit tftp.service has failed.

— The result is failed.

11月 12 18:33:01 xFdeora systemd[1]: Unit tftp.service entered failed state.

5.启动tftp.socket

sudo systemctl start tftp.socket sudo systemctl status tftp.socket tftp.socket – Tftp Server Activation Socket Loaded: loaded (/usr/lib/systemd/system/tftp.socket; disabled) Active: active (listening) since 二 2013-11-12 18:42:16 CST; 41s ago Listen: [::]:69 (Datagram) 11月 12 18:42:16 xFdeora systemd[1]: Starting Tftp Server Activation Socket. 11月 12 18:42:16 xFdeora systemd[1]: Listening on Tftp Server Activation Socket. 11月 12 18:42:56 xFdeora systemd[1]: Listening on Tftp Server Activation Socket.

6.再次执行:

systemctl start tftp.service

end!

猜你喜欢