zoukankan      html  css  js  c++  java
  • ubuntu16.04.2安装tftp服务器

    1.安装

    $ apt-get install tftp-hpa tftpd-hpa

    tftp-hpa是客户端

    tftpd-hpa是服务器

    2.创建目录

    $ mkdir /tftpboot

    这是创建tftp传输目录

    $ sudo chmod 777 /tftpboot

    给目录增加权限

    $ cd /tftpboot
    $ sudo touch test.txt

    在目录下创建test.txt文件

    3.配置

    # vi /etc/default/tftpd-hpa
    
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/tftpboot" 
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="-l -c -s"

    这里把目录改成了刚才创建的目录

    这里是选项,-c是可以上传文件的参数,-s是指定tftpd-hpa服务目录,上面已经指定

    4.重启服务

    $ sudo service tftpd-hpa restart

    # 启动服务,这里要注意,采用的独立服务形式。

    5.测试

    # cd /home
    # sudo touch test1.txt
    # tftp localhost
    tftp>get test.txt
    tftp>put test1.txt
    tftp>q 

    退出后,在/home目录下会有一个test.txt文件,在/tftpboot目录下会有test1.txt,表示tftp服务器安装成功!

  • 相关阅读:
    Yarn Client 模式
    K8S & Mesos 模式
    python_切片
    RDD执行原理
    基础编程
    python_html模板
    python_返回值
    python_机器学习_平均中位数模式
    VISIO下载+安装+第一个数据流图
    session对象
  • 原文地址:https://www.cnblogs.com/LoganChen/p/7919948.html
Copyright © 2011-2022 走看看