Install tftp in Ubuntu

Source: Internet
Author: User
Sudoapt-getinstalltftp-hpatftpd-hpasudoapt-getinstallxinetdsudoapt-getinstallnetkit-inetd2.cd/sudomkdir/tftpboo

1. sudo apt-get install tftp-hpa tftpd-hpa

Sudo apt-get install xinetd

Sudo apt-get install netkit-inetd

2. cd/

Sudo mkdir/tftpboot

Sudo chmod 777/tftpboot

3. sudo in. tftpd-l/tftpboot

In this way, the tftp server is started. The following is a test.

4. cd/tftpboot

Touch test

Create a file

5. cd/home/usrname

Log on to another directory

6. tftp 192.168.0.59

Change to your own ip Address

> Get/tftpboot/test

Open the directory/etc/xinetd. d/

Create File tftp

Tftp content:

Service tftp

{

Disable = no

Socket_type = dgram

Protocol = udp

Wait = yes

User = root

Server =/usr/sbin/in. tftpd

Server_args =-s/tftpboot-c

Per_source = 11

CPIs = 100 2

}

Restart the service:

Sudo/etc/init. d/xinetd restart

Sudo in. tftpd-l/tftpboot

Problems and causes during installation

Symptom 1:

Tftp> get test. log

Transfer timed out.

Cause:

Tftpd service not started

Symptom 2:

Tftp> get test. log

Error code 2: Only absolute filenames allowed

Cause:

Set server_args in/etc/xinetd. d/tftpd to/etc/default/tftpd-hpa

Cat/etc/default/tftpd-hpa

# Defaults for tftpd-hpa

RUN_DAEMON = "no"

OPTIONS = "-s/home/tftpd-c-p-U 077-u tftpd"

You only need to change server_args = to the server folder you set.

Symptom 3:

Tftp> put ex070416.log

Error code 1: File not found

Cause:

The specified file does not exist; or the-c option is not specified in the tftpd startup parameter, allowing the file to be uploaded

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.