您的位置:首页 > 运维架构 > Linux

linux-arm间tftp命令的安装、使用

2017-07-09 18:16 363 查看
原文出处:http://www.linuxidc.com/Linux/2013-07/87366.htm

目前波创终端使用的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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: