RedHat Linux 9 下 TFTP 搭建

來源:互聯網
上載者:User

TFTP是用來下載遠程檔案的最簡單網路通訊協定,基於UDP協議完成。
使用RedHat Linux 9中的第3張光碟片。以下是root登入操作

(1)安裝TFTP-server
# mount /mnt/cdrom
# cd /mnt/cdrom/RedHat/RPMS
# rpm -ivh tftp-*.i386.rpm
# cd ~
# umount /mnt/cdrom



(2)修改檔案
# vi /etc/xinetd.d/tftp
service tftp
{
socket_type =dgram
protocol =udp
wait =yes
user =root
server =/usr/sbin/in.tftpd
server_args =-s /home/liuby/tftpboot -c # 修改 注:-s指定的目錄,-c表示可以建立檔案
disable =no # 修改
per_source =11
cps =100 2
flags =IPv4
}

(3)啟動服務
建立TFTP Server 伺服器
# mkdir -m 777 /home/liuby/tftpboot
# service xinetd restart

(4)在命令列下 setup 在system services中(或ntsysv)選擇tftp,命令列lokkit關閉firewall

(5)重新啟動TFTP
# service xinetd restart

(6)測試
# tftp 192.168.0.2
tftp>get
tftp>put
tftp>q

(7)目標板測試(以下目標板上操作)
假設伺服器/home/liuby/tftpboot下有zImage,或交叉編譯的應用程式helloworld.o等
# tftp 192.168.0.2
tftp>get helloworld.o
tftp>q
# chmod +x helloworld.o
# ./helloworld.o

(8)mpc8349板下載server(59.64.155.12)的hello.o檔案
# tftp -g 59.64.155.12 -r hello.o
# chmod +x hello.o
# ./hello.o
+++++++++++++++++++++++++++++++++++++++++++++++
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.