TFTP 簡單文件傳輸協議
阿新 • • 發佈:2018-06-16
添加 scrip 3.1 寫入 ron system 客戶端和服務器 效率 修改 簡 介
簡單文件傳輸協議是一種基於UDP協議的客戶端和服務器之間進行簡單文件傳輸的協議,它提供了不復雜、開銷不大的文件傳輸服務。
它使用UDP協議的69號端口作為其傳輸,不能列出目錄內容,無驗證或加密機制,被用於在遠程服務器上讀取或寫入文件,因此文件的傳輸過程也不像FTP協議那樣可靠。但是TFTP不需要客戶端的權限認證,也就減少了無謂的系統和網絡帶寬消耗,因此在傳輸瑣碎不大的文件時,效率更加高,目前主要適用於私人的本地網絡中,常用於PXE無盤啟動,網絡設備的設置等。
部署環境:
- rhel6.5操作系統
- 服務器IP地址:192.168.100.5
- rhel6.5的鏡像光盤掛載至/mnt/cdrom/
部署服務:
1. 安裝xinetd、ftfp-server、tftp軟件包
rpm -ivh /mnt/cdrom/Packages/xinetd-2.3.14-39.el6_4.x86_64.rpm
rpm -ivh /mnt/cdrom/Packages/tftp-server-0.49-7.el6.x86_64.rpm
rpm -ivh /mnt/cdrom/Packages/tftp-0.49-7.el6.x86_64.rpm
2. 修改tftp配置文件
vim /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 = yesuser = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no //默認的yes修改為no,表示開啟
per_source = 11
cps = 100 2
flags = IPv4
3. 添加到系統開機項並啟動服務
chkconfig xinetd on
service xinetd start
TFTP的根目錄為/var/lib/tftpboot
4. 測試
TFTP應用不止於此,一般與其他軟件配合使用,如前博文 [親測可用] PXE無人值守自動裝機 的綜合應用。
TFTP 簡單文件傳輸協議