tftp服務器安裝與配置
tftp服務器
www.2cto.com
trivial file transfer protocol 簡單文件傳輸協議
tftp有三種傳輸模式:
netASCII 8位ASSCII
八位組模式
郵件模式
檢查是否安裝
[root@localhost Server]# rpm -qa | grep tftp-server
tftp-server-0.49-2
www.2cto.com
安裝
掛載安裝文件鏡像
[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
}
www.2cto.com
啟動服務器
[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