1、安装tftp服务
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
[root@cxishs-Nettest ~]
# yum install -y tftp-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tftp-server.x86_64 0:0.49-7.el6 will be installed
--> Processing Dependency: xinetd
for
package: tftp-server-0.49-7.el6.x86_64
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-39.el6_4 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================
Package Arch Version Repository Size
======================================================================================================
Installing:
tftp-server x86_64 0.49-7.el6 c6-media 39 k
Installing
for
dependencies:
xinetd x86_64 2:2.3.14-39.el6_4 c6-media 121 k
Transaction Summary
======================================================================================================
Install 2 Package(s)
Total download size: 161 k
Installed size: 317 k
Downloading Packages:
------------------------------------------------------------------------------------------------------
Total 2.6 MB
/s
| 161 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:xinetd-2.3.14-39.el6_4.x86_64 1
/2
Installing : tftp-server-0.49-7.el6.x86_64 2
/2
Verifying : tftp-server-0.49-7.el6.x86_64 1
/2
Verifying : 2:xinetd-2.3.14-39.el6_4.x86_64 2
/2
Installed:
tftp-server.x86_64 0:0.49-7.el6
Dependency Installed:
xinetd.x86_64 2:2.3.14-39.el6_4
Complete!
[root@cxishs-Nettest ~]
#
|
2、修改TFTP配置文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
[root@cxishs-Nettest ~]
# 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
/tmp/tftp/data
-c
##TFTP文件目录,-c表示支持上传
disable = no
##开启服务,默认TFTP服务关闭
per_source = 11
cps = 100 2
flags = IPv4
}
~
~
~
~
~
"/etc/xinetd.d/tftp"
18L, 514C written
[root@cxishs-Nettest ~]
#
[root@cxishs-Nettest ~]
# mkdir /tmp/tftp
[root@cxishs-Nettest ~]
# mkdir /tmp/tftp/data
[root@cxishs-Nettest ~]
# chmod 777 /tmp/tftp
[root@cxishs-Nettest ~]
# chmod 777 /tmp/tftp/data
|
3、重启并验证服务
1
2
3
4
5
6
|
[root@cxishs-Nettest ~]
# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@cxishs-Nettest ~]
# netstat -au | grep tftp
udp 0 0 *:tftp *:*
[root@cxishs-Nettest ~]
#
|
本文转自Grodd51CTO博客,原文链接:http://blog.51cto.com/juispan/2047238
,如需转载请自行联系原作者