日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux安装tftp服务器

發(fā)布時間:2024/8/1 linux 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux安装tftp服务器 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

簡介

TFTP(Trivial File Transfer Protocol,簡單文件傳輸協(xié)議)是TCP/IP協(xié)議族中的一個用來在客戶機與服務器之間進行簡單文件傳輸?shù)膮f(xié)議,提供不復雜、開銷不大的文件傳輸服務。端口號為69。

yum 安裝

先查看下yum源里是否有tftp軟件包

[root@localhost test]# yum list |grep tftp syslinux-tftpboot.noarch 4.05-15.el7 base tftp.x86_64 5.2-22.el7 base tftp-server.x86_64 5.2-22.el7

yum安裝tftp安裝tftp-server

[root@localhost test]# yum install tftp-server

安裝成功后,在/etc/xinetd.d下生成配置文件tftp。

[root@localhost xinetd.d]# ls /etc/xinetd.d chargen-dgram daytime-dgram discard-dgram echo-dgram pure-ftpd tftp time-stream chargen-stream daytime-stream discard-stream echo-stream tcpmux-server time-dgram [root@localhost xinetd.d]# vi /etc/xinetd.d/tftp

把disable=yes修改成no

service tftp {socket_type = dgramprotocol = udpwait = yesuser = rootserver = /usr/sbin/in.tftpdserver_args = -s /var/lib/tftpbootdisable = noper_source = 11cps = 100 2flags = IPv4 }

啟動tftp服務

啟動tftp服務,只需要重啟xinetd服務

service xinetd restart

查看69端口是否運行

[root@localhost xinetd.d]# netstat -nlp |grep 69 udp 0 0 0.0.0.0:69 0.0.0.0:* 77308/xinetd unix 2 [ ACC ] STREAM LISTENING 18691 746/NetworkManager /var/run/NetworkManager/private-dhcp unix 2 [ ACC ] STREAM LISTENING 16974 740/gssproxy /run/gssproxy.sock unix 2 [ ACC ] STREAM LISTENING 16973 740/gssproxy /var/lib/gssproxy/default.sock

防火墻設置(可選)

/sbin/iptables -I INPUT -p tcp --dport 69 -j ACCEPT /sbin/iptables -I INPUT -p udp --dport 69 -j ACCEPT /etc/rc.d/init.d/iptables save service iptables restart service iptables status

測試

[root@localhost test]# echo "1111" > /var/lib/tftpboot/name.txt [root@localhost test]# tftp 192.168.8.174 tftp> help tftp-hpa 5.2 Commands may be abbreviated. Commands are:connect connect to remote tftp mode set file transfer mode put send file get receive file quit exit tftp verbose toggle verbose mode trace toggle packet tracing literal toggle literal mode, ignore ':' in file name status show current status binary set mode to octet ascii set mode to netascii rexmt set per-packet transmission timeout timeout set total retransmission timeout ? print help information help print help information tftp> get name.txt tftp> q [root@localhost test]# ls |grep name.txt name.txt

總結(jié)

以上是生活随笔為你收集整理的linux安装tftp服务器的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。