Tftp installation configuration and tftp command usage in Embedded linux

Source: Internet
Author: User


In Embedded linux, tftp installation configuration and tftp command usage TFTP protocol introduction TFTP is the simplest network protocol used to download remote files, which is implemented through UDP protocol. The tftp development environment for Embedded linux includes two aspects: one is tftp-server support for the linux server, and the other is tftp-client Support for the Embedded Target System. Because u-boot itself supports built-in tftp-client, you do not need to configure the Embedded Target System. The following describes the configuration of tftp-server on the linux server. 1. install the xinetd, tftp, and tftp-server software. 1) If you can access the Internet, install: sudo yum install xinetd sudo yum install tftp sudo yum install tftp-server2) if you cannot access the Internet, you can directly install the supplied rpm package: sudo rpm-ivh xinetd-2.3.14-18.fc9.i386.rpm sudo rpm-ivh tftp-0.48-3.fc9.i386.rpm sudo rpm-ivh tftp-server-0.48-3.fc9.i386.rpm www.2cto.com 2, configure the tftp server to modify/etc/xinetd. d/tftp file, change disable = yes to disable = no. It mainly sets the root directory of the TFTP server and enables the service. The modified file is as follows: service tftp {socket_type = dgram protocol = udp wait = yes user = root server =/usr/sbin/in. tftpd server_args =-s/home/mike/tftpboot-c disable = no per_source = 11 cps = 100 2 flags = IPv4} description: modify the parameter server_args =-s <path>-c, where <path> can be changed to the root directory of your tftp-server. The parameter-s specifies the chroot, -c specifies that files can be created. 3. Start the tftp server and disable the Firewall/etc/init. d/iptables stop // disable the firewall sudo/sbin/service xinetd start or service xinetd restart/etc/init. d/xinetd start: After starting [OK], you can view www.2cto.com 4. Check whether the tftp service has enabled netstat-a | grep tftp. The result is udp 0 0 *: tftp *: * indicates that the service is enabled, indicating that the tftp configuration is successful. 5. tftp copies a file to the directory of the tftp server, and then starts the tftp software on the host for a simple test. Tftp 192.168.1.2tftp> get <download file> tftp> put <upload file> tftp> q 6. Use the following tftp Command to connect: connect to remote tftp server mode: File Transfer mode put: Upload File www.2cto.com get: Download file quit: Exit verbose: display detailed processing information tarce: Display package path status: display current status information binary: binary transmission mode ascii: ascii transmission mode rexmt: set the packet transmission timeout time timeout: Set the Retransmission timeout time help: help information?: Help information 7. If the error "AVC Denial, click icon to view" is always displayed and the file cannot be transferred, modify/etc/sysconfig/selinux as follows, set SELINUX to disable and use the setenforce 0 command to bring the selinux configuration file into effect. 8. Use the tftp Command in Busybox in the format of www.2cto.com tftp [option]... host [port] You must use these options to download or upload files. Chengdu Mingcheng technology. -G indicates the download file (get)-p indicates the Upload file (put)-l indicates the local file name (local file)-r indicates the remote host file name (remote file) for example, to download embedexpert from the remote host 192.168.1.2, enter the following command tftp-g-r embedexpert 192.168.1.2 by wincemobile

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.