首页 > 其他 > 详细

万丈高楼平底起:红帽7系搭建TFTP服务器

时间:2016-03-11 06:35:19      阅读:171      评论:0      收藏:0      [点我收藏+]

TFTP是简单文件传输协议,PXE部署过程中用来传输初始启动程序、内核及配置文件。

以下实验在CENTOS 7.2上完成

    

[root@localhost ~]# cat /etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[root@localhost ~]# uname -r

3.10.0-327.10.1.el7.x86_64

YUM直接安装

[root@localhost ~]# yum -y install tftp-server

RPM检查配置文件路径

[root@localhost ~]# rpm -qc tftp-server

/etc/xinetd.d/tftp

修改配置文件

disable改为no启用tftp服务

-c 允许tftp写入

-vvv记录详细日志,此参数在写在最后

/var/lib/tftpboot是默认tftp主目录,如果修改此路径要记得设置selinux相关权限

disable                 = no

server_args             = -s -c /var/lib/tftpboot -vvv

修改完配置文件后重启守护进程xinetd生效

root@localhost ~]# systemctl restart xinetd.service

配置开机自动运行xinetd进程

[root@localhost ~]# systemctl enable xinetd.service

检查xinetd启动状态

[root@localhost ~]# systemctl status xinetd.service

● xinetd.service - Xinetd A Powerful Replacement For Inetd

   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; disabled; vendor preset: enabled)

   Active: active (running) since Thu 2016-03-10 08:51:30 EST; 17s ago

防火墙开启的话允许tftp流量,perment参数表示永久生效,无此参数此防火墙规则在重启后失效。

 firewall-cmd --add-service=tftp --permenent

重启防火墙服务,生效上述规则

[root@localhost ~]# systemctl restart firewalld.service

检查tftp端口监听状态

ss -ul | grep tftp

[root@localhost ~]# ss -ul | grep tftp

UNCONN     0      0          *:tftp                     *:*

UNCONN     0      0         :::tftp                    :::*

万丈高楼平底起:红帽7系搭建TFTP服务器

原文:http://jerkou.blog.51cto.com/4397003/1749751

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