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:
- sudo apt-get install tftpd-hpa tftp-hpa
Configure tftp Server 2. Delete standalone Startup Mode
- update-rc.d -f tftpd-hpa remove
Configure the tftp Server 3. Create the 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
Configure the tftp Server 4. Create the 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
- }
Configure tftp Server 5. comment out the/etc/inetd. conf file to start tftpd
- #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.
Configure the tftp Server 6 and restart the xinetd service
- sudo /etc/init.d/xinetd restart
Configure the tftp Server 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, 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.