Ubuntu10.10Linux configuration TFTP download server

Source: Internet
Author: User
Because you need to use the network to download the kernel during Linxu debugging, tftp is usually used in Windows to complete this operation, however, when you debug the kernel, you often need to modify the kernel for debugging. Therefore, it is very troublesome to copy the kernel from Linux to Windows, so I want to configure the tftp service in Linux for direct download. After searching for a long time from the Internet, I found a good article and tried it. The results were satisfactory. 1. First, open the terminal with the root permission. Ubuntu

Because you need to use the network to download the kernel during Linxu debugging, tftp is usually used in Windows to complete this operation, however, when you debug the kernel, you often need to modify the kernel for debugging. Therefore, it is very troublesome to copy the kernel from Linux to Windows, so I want to configure the tftp service in Linux for direct download. After searching for a long time from the Internet, I found a good article and tried it. The results were satisfactory.

1. First, open the terminal with the root permission.

For Ubuntu 10. XX or later, you can find the root terminal. If not, you can use the sudo command prefix on a common terminal.

2. download and install the tftp server.

Generally, online tutorials require three files: tftp, tftpd, and openBSD-inetd. In fact, most of the applications use tftpd and openBSD-inetd. However, in order to unify and be foolish, we still use commands that everyone likes to use. After connecting the network cable, enter it on the terminal.

Sudo apt-get install tftpd tftp openbsd-inetd

Confirm and complete as prompted

3. restart the system.

4. Open the terminal and edit the configuration file/etc/inetd. conf.

The recommended command is sudo vim/etc/inetd. conf.

Find the following location in the configuration file:

#: BOOT: TFTP service is provided primarily for booting. Most sites

# Run this only on machines acting as "boot servers ."

# Tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/srv/tftp

# I commented out the default configuration file above with the well number and configured the following line myself

# Tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/tftp

Tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/tftp

Save the file and exit.

5. Create a file directory for the TFTP server.

Open the terminal and enter the root directory (with cd/) (or cd ..) to go to the top.

Enter the following command:

Sudu mkdir tftp

Sudu chmod 777/tftp

If you need to download an object, you can copy it in and use the chmod 777 command to open all permissions.

 

6. Run the following command to start or restart the xinetd service:

Sudo/etc/init. d/openbsd-inetd restart


7. Check whether port 69 is enabled. Run the following command:

Netstat-an | more

Find the following output:

Udp 0 0 0.0.0.0: 69 0.0.0.0 :*

 

8. You 'd better unify the operation and reboot the system.

9. After the system is restarted, run the sudo/etc/init. d/openbsd-inetd restart command to reset the status.

10. Test on the local machine:

Create a file under/tftp and write data to it:

Root @ ubuntu:/tftp # echo tftp test> test.txt

To the home directory:

Root @ ubuntu:/tftp # cd/home/

Root @ ubuntu:/home # tftp 192.168.0.114
Tftp> get test.txt
Received 11 bytes in 0.1 seconds
Tftp> quit
Root @ ubuntu:/home # cat test.txt
Tftp test

The test is successful.

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.