1、安裝相關(guān)軟件包
apt-get install tftpd (服務(wù)端)
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服務(wù)文件目錄
mkdir /home/xxx/tftproot
4、重新啟動(dòng)服務(wù)
/etc/init.d/xinetd restart
5、安裝完成,測試方法:
在/home/xxx/tftproot目錄下放任意文件“hello”
然后 運(yùn)行
tftp localhost
進(jìn)入tftp命令行,輸入
get hello /home/xxx/hello
看看是不是在/home/xxx有hello這個(gè)文件