linux安装tftp服务器
生活随笔
收集整理的這篇文章主要介紹了
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.el7yum安裝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)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 新萝卜家园Ghost XP SP3电脑城
- 下一篇: Linux实现倒计时显示时分QT,qt实