Three steps to build a tftp server

Source: Internet
Author: User

After learning about some basic content of the tftp server, we should begin to learn how to build the tftp server. Next, we will make a simple summary of this building process. I hope you can understand this part through the content of this article.

Set up a tftp server 1. Check whether the tftp server software is installed in the system:

[Root @ localhost lqm] # rpm-qa | grep tftp

Tftp-0.39-2

Tftp-server-0.39-2

Tftp server Construction 2. edit the file:/etc/xinetd. d/tftp

[Root @ localhost xinetd. d] # vi tftp

# Default: off

# Description: The tftp server serves files using the trivial file transfer \

# Protocol. The tftp protocol is often used to boot diskless \

# Workstations, download configuration files to network-aware printers ,\

# And to start the installation process for some operating systems.

Service tftp

{

Socket_type = dgram

Protocol = udp

Wait = yes

User = root

Server =/usr/sbin/in. tftpd

Server_args =-s/home/lqm/tftpboot-c

Disable = yes --------------- change yes to no!

Per_source = 11

CPIs = 100 2

Flags = IPv4

Note: The Modification Item server_args =-s-c can be changed to the root directory of your tftp-server, the parameter-s specifies chroot, and-c specifies that files can be created.

Build a tftp Server 3. Create a tftp folder

# Mkdir/home/lqm/tftpboot

# Chmod o + w/home/lqm/tftpboot

/Etc/init. d/iptables stop // disable the Firewall

Service xinetd restart // restart the xinetd service

Restart the xinetd service because the TFTP service is controlled by xinetd. xinetd is a service that manages services and does not open ports.

Verify whether TFTP is up:

[Root @ localhost tftp_root] # netstat-nlp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

Tcp 0 0: 22: * LISTEN 2828/sshd

Udp 0 0 0.0.0.0: 69 0.0.0.0: * 10887/xinetd

Udp 0 0 0.0.0.0: 69 0.0.0.0: * 10863/in. tftpd

Udp 0 0 0.0.0.0: 69 0.0.0.0: * 10778/in. tftpd

Port 69 is enabled, indicating that the service is started properly.

# Service xinetd restart

In this way, tftp-server is started. You can log on to the local machine to test the following command:

# Tftp your-ip-address

Tftp> get <download file>

Tftp> put <upload file>

Tftp> q

#

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.