目前波创终端使用的tftp是BusyBox-1.9.2,终端和虚机之间文件传输用法:
1、在虚机上安装tftp服务,
安装:
先安装xinetd 服务:yum install xinetd
安装tftp ,tftp-sever:yum install tftp tftp-sever
2、设置 :
a. 将/etc/xinetd.d/tftpd内容改为:
service tftp
{
disable = no
socket_type = dgram
wait = no
user = root
protocol = udp
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
log_on_success = PID HOST DURATION
log_on_failure = HOST
}
b. chmod 777 /tftpboot
c. 修改/etc/default/tftpd-hpa
将文档内容修改为:
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"
3、 启动
service xinetd restart
查看tftp是否启动的命令是 netstat -a | grep tftp,如果查看不到,关闭防火墙/etc/init.d/iptables stop
4、文件传输
在虚机(192.168.1.113)下/var/lib/tftpboot/test,在终端上运行
tftp -g -r test 192.168.1.113即可把虚机上的文件传到终端上
或是tftp -l test -r test -g 192.168.1.113
从终端到虚机
tftp -l test -r test -p 192.168.1.113,-l是本地文件名,-r是远程机子文件名,-p是要传到的主机IP