前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CentOS-TFTP服务器搭建

CentOS-TFTP服务器搭建

作者头像
偏有宸机
发布2020-11-05 15:18:26
2.5K0
发布2020-11-05 15:18:26
举报
文章被收录于专栏:宸机笔记宸机笔记

安装TFTP服务

代码语言:javascript
复制
yum install tftp-server
yum install xinetd        //TFTP是通过xintd运行的,所以需要安装Xinetd

配置tftp文件

vim /etc/xinetd.d/tftp

代码语言:javascript
复制
# 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 /var/lib/tftpboot        //FTP文件的根目录
    disable         = no        //缺省请况下是禁用TFTP的,所以要把yes改为no
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
}

设置TFTP目录的访问权限

代码语言:javascript
复制
chmod 777 /var/lib/tftpboot

开启TFTP服务

代码语言:javascript
复制
[root@localhost /]# /etc/init.d/xinetd start

可能出现的问题

1.tftpd服务没有启动

2.需要把selinux禁用掉 具体方法如下:

vim /etc/selinux/config

代码语言:javascript
复制
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

把上面的SELINUX=enforcing 改为:SELINUX=disable 禁用SeLinux 然后reboot重启PC

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-08-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装TFTP服务
  • 配置tftp文件
  • 设置TFTP目录的访问权限
  • 开启TFTP服务
  • 可能出现的问题
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档