Configuration of tftp Server

Source: Internet
Author: User

We have also explained how to configure the tftp server. Here we will mainly explain how to configure the tftp server in Ubuntu. We have summarized the specific steps and hope to help you.

Configure the tftp Server 1. Open the Ubuntu terminal and enter the following command:

 
 
  1. sudo apt-get install tftpd-hpa tftp-hpa 

Configure tftp Server 2. Delete standalone Startup Mode

 
 
  1. update-rc.d -f tftpd-hpa remove 

Configure the tftp Server 3. Create the user tftpd and its home directory

 
 
  1. Sudo mkdir-p/home/tftpd
  2. Sudo useradd-s/bin/false-g nogroup-d/home/tftpd [-p PASSWORD] tftpd
  3. Example: sudo useradd-s/bin/false-g nogroup-d/home/tftpd
  4. Add password: sudo useradd-s/bin/false-g nogroup-d/home/tftpd-p 123456
  5. 3.5 install xinetd

    Sudo apt-get install xinetd

Configure the tftp Server 4. Create the xinetd Startup File

 
 
  1. Cat/etc/xinetd. d/tftpd
  2. Service tftp
  3. {
  4. Disable = no
  5. Socket_type = dgram
  6. Wait = no
  7. User = root
  8. Protocol = udp
  9. Server =/usr/sbin/in. tftpd
  10. Server_args =-s/home/tftpd-p-c-U 077-u tftpd # // indicates that the tftp operation directory is on/home/tftpd.
  11. Log_on_success = PID HOST DURATION
  12. Log_on_failure = HOST
  13. }

Configure tftp Server 5. comment out the/etc/inetd. conf file to start tftpd

 
 
  1. #tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot  
  2. 5.5 if you have other network connections, such as WiFi, dual-eth cards, pls shutdown the others if tftp is not working. 

Configure the tftp Server 6 and restart the xinetd service

 
 
  1. sudo /etc/init.d/xinetd restart 

Configure the tftp Server 7. test whether the tftpd service is successful

 
 
  1. tftp localhost  
  2. tftp> put 123.log  
  3. tftp> put 123.log test.log  
  4. tftp> get test.log  
  5. tftp> get test.log abc.log  
  6. tftp> verbose  
  7. Verbose mode on.  
  8. tftp> trace  
  9. Packet tracing on.  
  10. tftp> put kkk.log  
  11. sent DATA  
  12. received ACK  
  13. .........  
  14. sent DATA  
  15. received ACK  
  16. Sent 12999997 bytes in -1.5 seconds [-69987938 bit/s] 

Note: In which directory is the tftp Command executed, the uploaded files are all files under this directory, and the downloaded files can only be those files under the server directory! Because the evb board is connected to the USB 0 Nic under Liunx, set the address of the USB 0 Nic. ifconfig to see if there is a nic, then sudo ifconfig usb0 192.168.100.1 because the default blob address server address is 192.168.100.1, you need to set it like this. Ps: if tftp is unavailable in Ubuntu, it must be a problem with the server. Run sudo/etc/init. d/xinetd restart again in liunx. You can use tftp localhost to test whether the server of the host can transmit data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.