1.当然是使用yum安装最直接,一共会安装3个东东
tftp.i386
tftp-server.i386
xinetd.i386
[root@localhost CentOS]# yum -y install tftp*

2.安装完后可以使用rpm命令查看
[root@localhost CentOS]#rpm -qa | grep tftp
tftp-server-0.49-2.el5.centos
tftp-0.49-2.el5.centos

3.正式使用之前需要修改一下配置
[root@localhost CentOS]# 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 '加-c
disable = yes '改为no #默认tftp服务是关闭的。
per_source = 11
cps = 100 2
flags = IPv4
}

修改后的代码:
# 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 -c
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
~
:wq (保存退出)

说明:修改项server_args= -s     <path>    -c,其中<path>处可以改为你的tftp-server的根目录,参数-s指定chroot,-c指定了可以创建文件。

4.启动tftp服务

[root@localhost CentOS]#cd /
[root@localhost /]# service xinetd start
Starting xinetd: [ OK ]
[root@localhost /]# setup '查看TFTP是否开机自动开启(系统服务选项) 查看防火墙是否开放TFTP端口,并在其他端口选项增加端口69:udp ,保存退出setup界面

5.修改tftp根目录权限
[root@localhost /]# ls
backups dev lib misc opt sbin sys usr
bin etc lost+found mnt proc selinux tftpboot var
boot home media net root srv tmp
[root@localhost /]# cd tftpboot/
[root@localhost tftpboot]# ls
[root@localhost tftpboot]# cd /
[root@localhost /]# chmod 777 tftpboot

6.重启tftp服务

[root@localhost /]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]

最新文章

  1. C语言编程技巧-signal(信号)[转]
  2. poj1083
  3. 非空二叉树的一个有趣的性质:n0 = n2 + 1
  4. bzoj1216 [HNOI2003]操作系统
  5. rsyslog Properties 属性:
  6. input事件以及中文输入法的处理
  7. calc()函数的使用
  8. border-radius 知识点
  9. Android清单文件具体解释(三)----应用程序的根节点&amp;lt;application&amp;gt;
  10. Activity的绘制流程简单分析(基于android 4.0源码进行分析)
  11. Django用自定义cookies 实现登录,注册,退出
  12. CEF小白人系列2-DEV环境配置-Windows10+SDK+VS2015
  13. dotnetcore ueditor
  14. ZIP、tar.gz压缩时排除指定目录
  15. HTML第十章总结
  16. how2j网站前端项目——天猫前端(第一次)学习笔记2
  17. Pymongo NotMasterError while fetching count of the collection as per query from MongoDB in DRF
  18. 函数的类型:函数也是类型 (*)-&gt;*
  19. Python pycurl使用
  20. pow() 函数

热门文章

  1. Javascript函数闭包及案例详解
  2. 彻底搞懂JavaScript的闭包、防抖跟节流
  3. Azure Terraform(三)部署 Web 应用程序
  4. 新来的运维这样用HDFS,CIO都懵了&#183;&#183;&#183;
  5. 常见大中型网络WLAN基本业务实例
  6. 任意文件下载漏洞的接口URL构造分析与讨论
  7. mac安装Navicat Premium Mac 12 破解版
  8. mybatis入门教程之搭建一个简单的mybatis项目并启动它
  9. 【Linux】nginx详细说明
  10. 在recover database时,如何决定该从哪一个SCN开始恢复