15.TFTP and NFS Server configuration

Source: Internet
Author: User
Tags file transfer protocol

. TFTP and NFS server configuration

Experimental requirements:

1. Install and configure the TFTP service.

2. Install and configure the NFS service.

Laboratory Equipment:

Software:

1. A VMware virtual machine with RHEL6 installed.

2. TFTP RPM installation package.

3. TFTP download tool Tftpd32.

4. The RPM installation package for NFS.

Hardware:

1.PC Machine one set.

Background knowledge:

1. Cross-development:

The development of embedded system adopts the cross-development mode. The so-called embedded development refers to the programming on the host, and then cross-compile to build the target machine can run on the platform of Binary code, and finally downloaded to the target platform on the specific location to run. The platform in which the embedded software is generated is called a host computer, usually a PC, and the platform that runs the embedded software is called the target machine. Host generally through the network, Usb,jtag and other ways to download the software to the target machine. Two of the more commonly used network downloads are TFTP and NFS mode.

2. TFTP server:

The TFTP (Trivial file Transfer Protocol, simple Files Transfer Protocol) is a protocol used by the TCP/IP protocol family to perform simple file transfer between the client and server, providing an uncomplicated, inexpensive file transfer service. The port number is 69.

TFTP is a simple UDP-based file transfer protocol that is typically used only for small file transfers. And it does not

There are many features of the usual FTP, which can only be obtained or written from the file server, cannot list directories, and does not authenticate.

In embedded development, the TFTP service is often used to download the image files from the TFTP directory on the PC server to the target board for burning, writing, or running through a network cable. Downloading files in this way is easy and fast to use.

3. Server for NFS:

NFS is a shorthand for the network file system, which is the web filesystem. NFS communicates with two Linux hosts, providing services similar to shared directories on Windows. In embedded Linux development, Linux targets often access files on Linux hosts via NFS. In order to achieve this kind of access, first you need the Linux file. NFS allows a system to share directories and files with other people on the network. By using NFS, users and programs can access files on the remote system as if they were accessing local files. In embedded development, services are often used to mount the root file system after the kernel is booted. NFS uses this approach to mount the root filesystem, providing a cheap and efficient solution for embedded product development and testing.

Experimental steps:

TFTP Server Installation

1. Install the TFTP server, mount the board image to the/MNT directory using the command "Mount/dev/cdrom/mnt", and then go to the "/mnt/packages" directory to locate the TFTP installation package. The installation package for the TFTP server in RedHat6 is "tftp-server-0.49-7.el6.i686.rpm", using "RPM–IVH

/mnt/packages/tftp-server-0.49-7.el6.i686.rpm ".

Attention:

Installation of the TFTP-SERVER-0.49-7.EL6.I686.RPM installation package depends on the installation package

xinetd-2.3.14-34.el6.i686.rpm, if the XINETD service is not installed when customizing the REDHAT6 installation, use the command before installing the TFTP service RPM–IVH xinetd-2.3.14-34.el6.i686.rpm "Install xinetd.

?

2. Configure the TFTP server, use the command "Vim/etc/xinetd.d/tftp",/etc/xinetd.d/tftp files such as 3-148 modification; " server_args=-c-s/tftpboot "means to select the"/tftpboot "directory for the TFTP server file download directory;" Disabled=no "indicates that the TFTP service is not running and that the TFTP service is running.

?

Figure 3-148

TFTP Service configuration file/etc/xinetd.d/tftp

3. Restart the TFTP service, and use the command "/etc/init.d/xinetd restart" to restart the TFTP service. as shown in 3-149;

Figure 3-149

Restart the TFTP service

4. Test the TFTP service, set up the network environment according to the 14th Chapter method, make Windows and Linux ping each other, turn off the Linux firewall and SElinux, find the TFTPD soft in the TFTP and NFS server configuration \ Related software \tftpd And then run and configure it as shown in Figure 3-150. "1" Select the TFTP client function using TFTPD32, "2" host address is the IP address of the TFTP server, "3" local file, download the TFTP server file to save the local location and file name; "4" Remote file, the file to be downloaded on the TFTP server. When the settings are complete, select Download.

?

?

Figure 3-150

TFTPD Software Settings

Attention:

The first thing to do is to make sure the downloaded file exists in the TFTP server's folder when you use Tftpd32 to download the file, and secondly, the downloaded file address is "D:\" and the location should be clearly recorded.

Server for NFS Installation

5. Configure the NFS service, use "Vim/etc/exports" to open the NFS configuration file, and modify it by 3-151.

Figure 3-151

NFS configuration file/etc/exports

The NFS configuration file/etc/exports contains the following three fields:

NFS Shared directory Name: The NFS shared directory name that needs to be output, such as/.

"Client host Address": The host address that can access the shared directory, such as 192.168.0.*, where

The * number indicates a wildcard character.

Set options: Sets the properties of the shared directory. Common settings options are:

6. Start the NFS server and use the command "/etc/init.d/nfs restart" as shown in server Restart for NFS 3-152, indicating that the NFS server was successfully built. The use of Server for NFS will be used when the NFS file system is made, and will be used later.

Figure 3-152

Restart NFS Service

Summarize:

In this experiment we are familiar with how to install, configure, start, and test the TFTP Service and NFS service in Linux.

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

15.TFTP and NFS Server configuration

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.