CentOS7下tftp服务安装配置
1、软件包安装
root用户或者普通用户使用sudo权限执行如下命令:
yum install xinetd tftp tftp-server # root 用户执行
sudo yum install xinetd tftp tftp-server # 普通用户执行
2、tftp-Server服务配置
[root@localhost ~]# cat /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 /var/lib/tftpboot -c # 注意这行,如果允许上传,一定要加上参数 -c
disable = no # 这行默认为yes,改成no,允许
per_source =
cps =
flags = IPv4
}
3、启动tftp服务
[root@localhost ~]#systemctl restart xinetd.service
[root@localhost ~]# netstat -a | grep tftp
udp 0 0 0.0.0.0:tftp 0.0.0.0:*
udp6 0 0 [::]:tftp [::]:*
[root@localhost ~]# netstat -tunap | grep :69
udp 0 0 0.0.0.0:69 0.0.0.0:* 30014/xinetd
udp6 0 0 :::69 :::* 1/systemd
4、测试上传下载
C:\>d: D:\>tftp 10.190.38.213 get test.log
传输成功: 1 秒 17 字节,17 字节/秒 D:\>tftp 10.190.38.213 put d:\readme
传输成功: 1 秒 474 字节,474 字节/秒 D:\>
5、常见问题处理
5.1 如果上传时出现"连接请求失败"的提示,请确保tftp服务的文件存放目录权限设置正确
- 解决办法:chmod 0777 /var/lib/tftpboot
5.2 文件上传时提示:Error code 1: File not found
在/etc/xinetd.d/tftp配置文件中,server_args后加上 -c 选项,方可上传
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot -c
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
5.3 如客户端无法连接,或包timeout
请确认服务器iptables策略开放了UDP的 69 端口,并关闭了selinux服务。
iptables策略开放:
# 编辑iptables配置文件
[root@localhost ~]# vim /etc/sysconfig/iptables # sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [:]
:FORWARD ACCEPT [:]
:OUTPUT ACCEPT [:]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport -j ACCEPT
-A INPUT -p udp -m state --state NEW -m tcp --dport 69 -j ACCEPT
或者执行如下命令:
iptables -A INPUT -p udp --dprot 69 -j ACCEPT
CentOS7下tftp服务安装配置的更多相关文章
- CentOS7下RabbitMQ服务安装配置
参考文档: CentOS7下RabbitMQ服务安装配置 http://www.linuxidc.com/Linux/2016-03/129557.htm 在linux下安装配置rabbitMQ详细教 ...
- CentOS7下RabbitMQ服务安装配置胜多负少
RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.RabbitMQ据说具有良 ...
- CentOS7下RabbitMQ服务安装配置 (亲测有效)
erlang 21.3 rabbitmq-server 3.7.14 下载地址 链接: https://pan.baidu.com/s/1g_T1Q_6zpyO3AepS0ZPgYQ 提取码: abq ...
- CentOS7下NFS服务安装及配置固定端口
CentOS7下NFS服务安装及配置 系统环境:CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64 软件版本:nfs-utils-1. ...
- CentOS下TFTP服务安装
CentOS下TFTP服务安装 今天和同学做交换机恢复DCN操作系统的任务,然后需要用到tftp,然后就开始研究.这里对TFTP服务进行介绍以及安装. tftp 比 ftp 更易于管理 tftp 比 ...
- Linux下TFTP的安装,配置和操作
注:转载他人,仅供自己研究学习使用 TFTP是用来下载远程文件的最简单网络协议,它其于UDP协议而实现.嵌入式linux的tftp开发环境包括两个方面:一是linux服务器端的tftp-server支 ...
- CentOS7下MySQL5.7安装配置方法图文教程(YUM)
安装环境:CentOS7 64位,MySQL5.7 1.配置YUM源 在MySQL官网中下载YUM源rpm安装包:http://dev.mysql.com/downloads/repo/yum/ # ...
- Linux下DHCP服务安装配置
简介 安装配置 一.简介 DHCP (Dynamic Host Configuration Protocol,动态主机管理协议)是一种基于UDP协议且仅限用于局域网的网络协议,主要用途是为局域网内部设 ...
- CentOS7下NFS服务安装及配置
系统环境:CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64 软件版本:nfs-utils-1.3.0-0.48.el7_4.x86_ ...
随机推荐
- bootstrap基础学习【网格系统】(三)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- NOIp2012:借教室
题目描述 在大学期间,经常需要租借教室.大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室.教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样. 面对海量租借教室的信息,我们自然 ...
- ZoomEye
* https://www.zoomeye.org/ *类似工具 IVRE 1. 摄像头漏洞 (1)http://www.2cto.com/Article/201401/269458.html (2) ...
- B7. Concurrent 锁的分类
[概述] 锁的分类根据不同的维度可以分为以下几种: 悲观锁和乐观锁 共享锁(S锁,读锁)和排他锁(X锁,写锁) 公平锁和非公平锁 重入锁 分段锁 [悲观锁和乐观锁] 悲观锁和乐观锁是两种处理并发冲突的 ...
- [转帖]XCopy复制文件夹命令及参数详解以及xcopy拷贝目录并排除特定文件
XCopy复制文件夹命令及参数详解以及xcopy拷贝目录并排除特定文件 https://www.cnblogs.com/smartsmile/p/7665979.html xcopy dirA dir ...
- Python 解LeetCode:33. Search in Rotated Sorted Array
题目描述:在一个旋转数组中查找给定的值,其中旋转数组中不含重复值: 思路: 第一遍二分遍历,找到数组中最小值的索引: 第二遍分别对最小值左右两边的数组进行二分查找: class Solution(ob ...
- (六)mybatis 全局配置文件讲解
目录 properties (属性) settings 全局参数配置 typeAliases 别名设置 typeHandlers 类型处理器 mapper (映射器) 细节 properties (属 ...
- php 连接webservice接口
首先谢谢前人, 引用:https://www.cnblogs.com/xbxxf/p/10103430.html 本来说对接接口,我以为是一扮curl接口形式,结果最后给接口锝时候才告诉我是webse ...
- JSON格式互转集合 (2)
public class JSON { public static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss"; ...
- 无法删除登录名 '***',因为该用户当前正处于登录状态。 (Microsoft SQL Server,错误: 15434)
问题描述: 当删除数据库用户时,有时会得到这样的提示: 无法删除登录名 '***',因为该用户当前正处于登录状态. (Microsoft SQL Server,错误: 15434) 解决办法: 1.首 ...