tftp服务器安装与配置

tftp服务器


trivial file transfer protocol 简单文件传输协议


tftp有三种传输模式:
netASCII 8位ASSCII
八位组模式
邮件模式


检查是否安装
[root@localhost Server]# rpm -qa | grep tftp-server
tftp-server-0.49-2




安装
挂载安装文件镜像
[root@localhost Server]# rpm -ivh tftp-0.49-2.i386.rpm
warning: tftp-0.49-2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...


(100########################################### [100%]
1:tftp (


88########################################### [100%]




[root@localhost Server]# rpm -ivh tftp-server-0.49-2.i386.rpm
warning: tftp-server-0.49-2.i386.rpm: Header V3 DSA signature: NOKEY, key ID


37017186
error: Failed dependencies:
xinetd is needed by tftp-server-0.49-2.i386


[root@localhost Server]# rpm -ivh xinetd-2.3.14-10.el5.i386.rpm
warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID


37017186
Preparing...


(100########################################### [100%]
1:xinetd (


1########################################### [100%]


[root@localhost Server]# rpm -ivh tftp-server-0.49-2.i386.rpm
warning: tftp-server-0.49-2.i386.rpm: Header V3 DSA signature: NOKEY, key ID


37017186
Preparing...


(100########################################### [100%]
1:tftp-server (


2########################################### [100%]






修改配置文件
[root@localhost /]# vi /etc/xinetd.d/tftp


# 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
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no #修改此处
per_source = 11
cps = 100 2
flags = IPv4
}


启动服务器
[root@localhost ~]# /etc/init.d/xinetd start
启动 xinetd: ol. O


查看服务器是否启动成功
[root@localhost ~]# netstat -a|grep tftp
udp 0 0 *:tftp *:*


检查端口
[root@localhost ~]# netstat -anulp | grep 69
udp 0 0 0.0.0.0:69 0.0.0.0:*


10548/xinetd




客户端
[root@localhost Server]# tftp
(to) 192.168.1.26
tftp> get /home
注:
/*常用以下文件用作目录文件*/
get ls.txt

你可能感兴趣的:(ftp)