Tftp installation configuration and command usage

Source: Internet
Author: User
Tftp is the simplest network protocol used to download remote files. it is implemented by UDP. 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 tftp is the simplest network protocol used to download remote files, it is implemented by UDP. 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. to install the tftp server, install xinetd, tftp, and tftp-server. 1) If you can access the Internet, use yum to install: sudo yum install xinet sudo yum install tftp-server 2) If you cannot access the Internet, you can directly install the provided 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 2. configure tftp server modifications/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 server_args =-s -C, where The directory can be changed to the root directory of your tftp-server. the parameter-s specifies the chroot, and-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: start [OK]. 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.2 tftp> get Tftp> put Tftp> q 6. usage of the tftp command: tftp your-ip-address [access the TFTP operation] connect: connect to the remote tftp server mode: file transfer mode put: upload File get: download file quit: Exit verbose: Display detailed processing information tarce: Display package path status: Display current status information binary: binary transfer mode ascii: ascii transfer mode rexmt: set the packet transmission 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. the command format of the tftp command in Busybox is: 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

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.