Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure tftp Server in Linux system

2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the Linux system how to configure the tftp server, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

TFTP is the simplest network protocol for downloading remote files. It is implemented in the UDP protocol.

Introduction to tftp server: TFTP is the simplest network protocol for downloading remote files. It is implemented in UDP protocol.

The tftp development environment of embedded linux includes two aspects: one is the tftp-server support of linux server, the other is the tftp-client support of embedded target system.

Because u-boot itself has built-in support for tftp-client, the embedded target system side does not need to be configured.

Linux configure tftp server specific steps: first, install tftp server

First check to see if there is a tftp server installation package on our Linux server.

[yangzheng@centos6 ~] $rpm-qa | grep tftp

If not, I can download and install it with yum.

[yangzheng@centos6 ~] $sudo yum install-y tftp-server

There is another way to install tftp, that is to hang up the CD (of course, the first thing is to find the CD, the way to find the CD can be found by Baidu)

[yangzheng@centos6 ~] $sudo mount-o loop / mnt/hgfs/windows/CentOS-6.0-i386-bin-DVD.iso / mnt1/

After mounting it, go to the mnt1/Packge directory and install it using the following command (here you want to install two RPM packages)

[yangzheng@centos6 Packages] $sudo rpm-ivh tftp-0.49-5.1.el6.i686.rpm

[yangzheng@centos6 Packages] $sudo rpm-ivh tftp-server-0.49-5.1.el6.i686.rpm

Configure and start the tftp service

[yangzheng@centos6 /] $sudo vim etc/xinetd.d/tftp

Here, change disable to no, and-s / tftp-c means-s refers to the root directory of the tftp server, and-c is the creation file.

Create the tftp root directory, turn off the firewall, and start tftp-server

[yangzheng@centos6 /] $sudo mkdir tftp

Restart the xinetd service, because the tftp service is controlled by the xinetd service, which does not open the port, so verify that the tftp port is open (tftp port is 69)

IV. Modification of SELinux policy

If the system turns on SELinux, tftp may be blocked during download, so we can temporarily shut it down with the following command:

[yangzheng@centos6 /] $sudo setenforce 0

If you want to completely disable SElinux, you can modify the configuration file to set SELINUX to disable

V. Firewall policy modification

If Linux turns on the firewall, it may also block the download of tftp. This is the tftp enabled in the rules in which we can load the firewall. The following one only needs to use port 69.

Of course, we can also use the command to turn off Linux's firewall.

If we want the system not to start the firewall when it starts, then we should use the ntsysv command to turn off the firewall, and we can also set up the tftp service to be enabled when the system starts.

[yangzheng@centos6 /] $sudo ntsysv

Thank you for reading this article carefully. I hope the article "how to configure the tftp server in Linux system" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report