TFTP Server的搭建和使用(Fedora)


一、tftp服務的安裝

yum install xinetd tftp tftp-server

表示我安裝的已經是最新版本的tftp服務了,不用更新了。

二、配置tftp服務的相關參數(沒有就創建新的文件啊!!!!記住沒有就建立新的)

vim /etc/xinetd.d/tftp

文件內容如下,需要修改的內容有兩個地方(server_args和disable參數),參數的具體意義寫在了圖片中:

server_args:

參數-s表示指定了chroot

參數-c表示可以創建文件

內容如下:

 1 service tftp
 2 {
 3         socket_type = dgram
 4         protocol    = udp
 5         wait        = yes
 6         user        = root
 7         server      = /usr/sbin/in.tftpd
 8         server_args = -s /tftpboot -c
 9         disable     = no
10         per_source  = 11
11         cps         = 100 2
12         flags       = IPv4
13 }
View Code

三、啟動tftp服務流程(寫好的sh腳本來啟動tftp服務)

tftp_start.sh腳本的內容:

etc/init.d/iptables stop
service xinetd start
netstat -a | grep tftp

表示成功啟動了tftp服務

四、tftp服務的使用(基本的使用方法)

tftp IPAddress #連接到IP地址對應的tftp服務器上
tftp>put <upload file> #上傳文件到tftp服務器
tftp>get <download file> #下載來自IP地址tftp服務器的文件
tftp>quit #退出tftp服務

待續~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM