1、安裝相關軟件包
apt-get install tftpd (服務端)
apt-get install tftp (客戶端)
apt-get install xinetd
2、建立配置文件
sudo gedit /etc/xinetd.d/tftp
輸入:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home/xxx/tftproot
指定tfpt的文件目錄 disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
3、建立tftp服務文件目錄
mkdir /home/xxx/tftproot
4、重新啟動服務
/etc/init.d/xinetd restart
5、安裝完成,測試方法:
在/home/xxx/tftproot目錄下放任意文件“hello”
然后 運行
tftp localhost
進入tftp命令行,輸入
get hello /home/xxx/hello
看看是不是在/home/xxx有hello這個文件