linux下安装配置tftp服务器
来源:互联网 发布:淘宝书店转让 编辑:程序博客网 时间:2024/06/04 05:34
TFTP(Trivial File Transfer Protocol)是TCP/IP协议族中的一个用来在服务器和客户机之间进行简单文件传输的协议,提供不复杂、开销不大的文件传输服务。端口号为69。
tftp命令操作如下
Usage: tftp [-4][-6][-v][-l][-m mode] [host [port]] [-c command]
下面介绍详细的服务器搭建过程。
1,安装
查看是否安装tftp软件包
[lingyun@localhost ~]$rpm -qa | grep tftp
tftp-0.49-7.el6.x86_64
tftp-server-0.49-7.el6.x86_64
如果你没有安装,就自己用yum安装一下
[lingyun@localhost ~]$sudo yum -y install tftp
2,配置tftp服务器
[lingyun@localhost ~]$sudo vim /etc/xinetd.d/tftp
下面的是我的配置,
service tftp{ socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftp -c disable = no per_source = 11 cps = 100 2 flags = IPv4}
注意:
(1)在disable一栏,一定要修改为no,否则你的tftp服务器用不了
(2)server args一栏,-s /tftp是指定tftp的根目录,-c表示能够创建文件
关闭selinux
[lingyun@localhost ~]$sudo vim /etc/sysconfig/selinux
SELINUX=disabledSELINUXTYPE=targeted
3启动tftp服务器
[lingyun@localhost ~]$sudo service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
查看端口是否正常
[lingyun@localhost ~]$sudo netstat -nlp | grep 69
udp 0 0 0.0.0.0:69 0.0.0.0:* 14008/xinetd
unix 2 [ ACC ] STREAM LISTENING 11147 1690/gnome-session @/tmp/.ICE-unix/1690
unix 2 [ ACC ] STREAM LISTENING 11148 1690/gnome-session /tmp/.ICE-unix/1690
unix 2 [ ACC ] STREAM LISTENING 11204 1697/gconfd-2 /tmp/orbit-gdm/linc-6a1-0-77f033b75534
4,测试是否能够使用
测试下载
[lingyun@localhost ~]$ ls /tftp/
mytext
[lingyun@localhost ~]$ ls
fl2440 u-boot-2010.09.bak vim_conf.zip
[lingyun@localhost ~]$ tftp 192.168.1.79
tftp> get mytext
tftp> q
[1]+ Stopped tftp 192.168.1.79
[lingyun@localhost ~]$ ls
fl2440 mytext u-boot-2010.09.bak vim_conf.zip
测试上传
[lingyun@localhost ~]$ ls /tftp/
mytext
[lingyun@localhost ~]$ ls
fl2440 mytext u-boot-2010.09.bak vim_conf.zip
[lingyun@localhost ~]$ tftp 192.168.1.79
tftp> put vim_conf.zip
tftp> q
[4]+ Stopped tftp 192.168.1.79
[lingyun@localhost ~]$ ls /tftp/
mytext vim_conf.zip
- linux下安装配置tftp服务器
- linux 下配置tftp服务器
- Linux 下tftp 服务器配置
- linux下TFTP服务器配置
- 9、Linux下tftp服务器的安装及配置
- Ubuntu下安装tftp服务器配置
- Ubuntu9.10下安装配置tftp服务器
- Ubuntu10.10下安装配置tftp服务器
- Ubuntu9.10下安装配置tftp服务器
- Ubuntu9.10下安装配置tftp服务器
- Ubuntu9.10下安装配置tftp服务器
- Ubuntu-14.04下安装、配置tftp服务器
- Ubuntu下安装配置tftp服务器
- fedora20下tftp服务器安装与配置
- centos下安装配置TFTP服务器
- Redhat Linux下tftp服务器配置1.0
- Linux下TFTP与NFS服务器配置
- Linux TFTP 服务器安装与配置
- 大型分布式网站架构技术总结
- 哈理工 OJ 2215 Angle(简单的思维题)
- hdu 1864 最大报销额
- Python 下载文件
- XAPP的使用
- linux下安装配置tftp服务器
- Android Hanlder小例子
- GreenPlum安装性能监控工具GPCCC(Greenplum Command Center Console)
- Opencv--访问Mat图像中每个像素的值
- HDU 2227 Phi 函数(简单的欧拉相关题)
- Remove Duplicates from Sorted Array
- Git学习笔记(二)
- c语言生成 o~100随机数!
- linux开机自动启动脚本