Install, set up, and debug a tftp server on ubuntu 12.04

Source: Internet
Author: User

Step 1: Install, set up, and debug the tftp server in ubuntu 12.04: First, it indicates that the ubuntu root is disabled by default. Therefore, you must create a root user so that you do not need to create sudo again: $ su root enter the password to obtain the Administrator account operation www.2cto.com Step 2: install the service and install tftp-hpa tftpd-hpa xinetd # apt-get install tftp-hpa tftpd-hpa xinetd Step 3: create a folder/tftpboot (this is the file Exchange Directory of the server. In the future, the client will obtain the Server File from this folder ), and modify the permission of this folder to 777 # mkdir/tftpboot # chmod-R 777/tftpboot www.2cto.com Step 4: Modify the tftp configuration file. If not, create it, I like to use vim # vim/etc/xinetd. d/tftp file content: service tft P {disable = no socket_type = dgram protocol = udp wait = yes user = root server =/usr/sbin/in. tftpd server_args =-s/tftpboot // here the file directory is the Server File Exchange Directory mentioned above source = 11 cps = 100 2 flags = IPv4} Step 5: Modify inetd. conf file # vim/etc/inetd. conf usually contains content in this file when it is opened. Just add the following content at the end: tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/tftpboot // The file directory is the Server File Exchange Directory mentioned above step 6: Modify the tftpd-hpa file # vim/etc/default/tft Pd-hpa content: # RUN_DAEMON = "no" # OPTIONS = "-s/home/zyp/tftpboot-c-p-U tftpd" TFTP_USERNAME = "tftp" TFTP_DIRECTORY = "/tftpboot"/here the file directory is the Server File Exchange Directory TFTP_ADDRESS = "0.0.0.0: 69 "TFTP_OPTIONS ="-l-c-s "Step 7: restart the service # service tftpd-hpa restart # sudo/etc/init. d/xinetd reload # sudo/etc/init. step 8 of d/xinetd restart: Local test (1) create a test file under/tftpboot, and modify the file permissions of test # cd/tftpboot # touch test # chmod 777 test (2) to test the tftp service :# Cd/# tftp 127.0.0.1 tftp> get test tftp> q # ls check the current directory and find that the test file is already in the current directory. At this time, tftp is set up successfully! Appendix: differences between tftp and ftp TFTP is a simple protocol for transferring files, which is implemented through UDP, but we cannot determine that some TFTP protocols are completed based on other transmission protocols. This protocol is designed to transfer small files. Therefore, it does not have many FTP functions. It can only obtain or write files from the file server, but cannot list directories, and does not perform authentication. It transfers 8-bit data. There are three transmission modes: netascii, which is an eight-bit ASCII code format and octet, which is an eight-bit source data type. The last mail is no longer supported, it directly returns the returned data to the user rather than saving it as a file.

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.