Install the tftp server in Ubuntu

Source: Internet
Author: User
1. First, install the server and client in Ubuntu to open the Ubuntu terminal, and enter the following command: sudoapt-getinstalltftpd-hpatftp-hpa2, remove standalone startup update-rc.d-ftftpd-hparemove3, new user tftpd and its home directory sudomkdir-p/home/tftpdsudouseradd-s/

1. First install the server and client in Ubuntu

Open the Ubuntu terminal and enter the following command:
Sudo apt-get install tftpd-hpa tftp-hpa

2. Delete the standalone startup method.
Update-rc.d-f tftpd-hpa remove

3. Create a user tftpd and its home directory
Sudo mkdir-p/home/tftpd
Sudo useradd-s/bin/false-g nogroup-d/home/tftpd [-p PASSWORD] tftpd
Example: sudo useradd-s/bin/false-g nogroup-d/home/tftpd
Add password: sudo useradd-s/bin/false-g nogroup-d/home/tftpd-p 123456

3.5 install xinetd

Sudo apt-get install xinetd

4. Create an xinetd Startup File
Cat/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/home/tftpd-p-c-U 077-u tftpd # // indicates that the tftp operation directory is on/home/tftpd.
Log_on_success + = PID HOST DURATION
Log_on_failure + = HOST
}
5. comment out the tftpd startup in the/etc/inetd. conf file
# Tftp dgram udp wait root/usr/sbin/in. tftpd/usr/sbin/in. tftpd-s/var/lib/tftpboot

5.5 if you have other network connections, such as WiFi, dual-eth cards, pls shutdown the others if tftp is not working.

6. Restart the xinetd service.
Sudo/etc/init. d/xinetd restart

7. test whether the tftpd service is successful
Tftp localhost
Tftp> put 123.log
Tftp> put 123.log test. log
Tftp> get test. log
Tftp> get test. log abc. log
Tftp> verbose
Verbose mode on.
Tftp> trace
Packet tracing on.
Tftp> put kkk. log
Sent DATA
Received ACK
.........
Sent DATA
Received ACK
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, the address of the USB 0 Nic is set.
Ifconfig to see if there is a NIC
Then
Sudo ifconfig usb0 192.168.100.1 because the default blob address is 192.168.100.1, you need to set this parameter.

Ps:
If tftp cannot be used 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.

Related Article

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.