ubuntu9.0.4搭建tftp服务全过程详解

1、安装两个软件包:tftp、tftpd,tftp是客户端,tftpd是服务器;

2、创建根目录:sudo mkdir /srv/tftp,赋予权限,chmod a+w /srv/tftp;

3、查看配置文件/etc/inetd.conf:“tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp”,最后的/srv/tftp是tftpd存放文件的路径

4、启动tftp服务:in.tftpd -l /srv/tftp;

5、测试tftp服务:

root@lion3875-laptop:# tftp localhost
tftp> ?
Commands may be abbreviated. Commands are:

connect connect to remote tftp
mode set file transfer mode
put send file
get receive file
quit exit tftp
verbose toggle verbose mode
trace toggle packet tracing
status show current status
binary set mode to octet
ascii set mode to netascii
rexmt set per-packet retransmission timeout
timeout set total retransmission timeout
? print help information
tftp> put xx (将当前目录下的xx文件上传到tftp根目录/srv/tftp)

tftp> get xx(从tftp根目录/srv/tftp下载xx文件到当前目录)
 

你可能感兴趣的:(ubuntu,操作系统,职场,休闲,tftp服务)