Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1363328
  • 博文数量: 118
  • 博客积分: 3888
  • 博客等级: 中校
  • 技术积分: 2940
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-10 18:15
个人简介

一看二做三总结

文章分类

全部博文(118)

分类: LINUX

2014-12-23 20:49:35

Install tftp server

  1. Install following packages.
  1. sudo apt-get install xinetd tftpd tftp 
  2. Create and put this entry int /etc/xinetd.d/tftpd

    service tftp
    {
    protocol        = udp
    port            = 69
    socket_type     = dgram
    wait            = yes
    user            = nobody
    server          = /usr/sbin/in.tftpd
    server_args     = /tftpboot
    disable         = no
    } 
  3. Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot

    sudo mkdir /tftpboot
    sudo chmod -R 777 /tftpboot
    sudo chown -R nobody /tftpboot 
  4. Restart the xinetd service.

    sudo /etc/init.d/xinetd restart 
    (sudo /etc/init.d/xinetd start)
    (sudo /etc/init.d/xinetd stop)
    Now our tftp server is up and running. 

Testing our tftp server

  1. Create a file named test with some content in /tftpboot path of the tftp server

    Obtain the ip address of the tftp server using ifconfig command

  2. Now in some other system follow the following steps.

    tftp 192.168.1.2
    tftp> get test
    Sent 159 bytes in 0.0 seconds
    
    tftp> quit
    
    cat test 

阅读(2891) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~