首页 > 其他 > 详细

00 - PXE | TFTP

时间:2019-08-22 09:08:25      阅读:86      评论:0      收藏:0      [点我收藏+]

00 - PXE | TFTP

1. 安装

安装环境Centos7.3

# yum install xinetd  
# yum install tftp
# yum install tftp-server

如果不能上网,可以直接安装提供的rpm包:

sudo rpm -ivh xinetd-2.3.14-18.fc9.i386.rpm
sudo rpm -ivh tftp-0.48-3.fc9.i386.rpm
sudo rpm -ivhtftp-server-0.48-3.fc9.i386.rpm

2. 配置

查看哪个分区空间较大,设置为tftp目录df -h

# mkdir /data/tftpboot
# chmod  777 /data/tftpboot

vim /etc/xinetd.d/tftp

service tftp
{
       socket_type             = dgram
       protocol                = udp
       wait                    = yes
       user                    = root
       server                  = /usr/sbin/in.tftpd
       server_args             = -s /data/tftpboot -c # 修改目录位置
       disable                 = no # 修改为no
       per_source              = 11
       cps                     = 100 2
       flags                   = IPv4
}

修改/etc/sysconfig/selinux文件,关闭selinux
SELINUX=disabled
systemctl restart xinetd
查看tftp服务是否开启:
netstat -a | grep tftp
显示结果为 udp 0 0 *:tftp : 表示服务已经开启,tftp配置成功

加入iptables

vi /etc/sysconfig/iptables
加一行
-A INPUT -p udp --dport 69 -j ACCEPT

保存

重启iptables

service iptables restart

chkconfig tftp  on
chkconfig xinetd  on
service xinetd  restart
service tftp restart

00 - PXE | TFTP

原文:https://www.cnblogs.com/hbgzy/p/11392325.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!