RedHatEnterpriseLinux5 install the TFTP server and NFS server

Source: Internet
Author: User
Abstract In embedded development, there are two types of host machines: Host machines are computers that compile and link embedded software, and target machines are hardware platforms that run embedded software. As a host software, the TFTP server mainly provides download of the main image files of the target machine. Solution 1. Use the following command to install the TFTP server. You can see that the TFTP server has been started. You do not need to install [root @ localhostServer] # netst.

Abstract

In embedded development, there are host machines and target machines: Host machines are computers that compile and link embedded software, and target machines are hardware platforms that run embedded software.

As a host software, the TFTP server mainly provides download of the main image files of the target machine.

Solution

I. Installation of TFTP Server

Run the following command to check that the TFTP server has been started.

[Root @ localhost Server] # netstat-a | grep tftp
Udp 0 0 *: tftp *:* 

If not, the RPM installation package is available on the RedHat Enterprise Linux 5 installation disc. After the installation disc is attached, go to the folder and find the corresponding installation package.

[Root @ localhost user] # cd/media/
[Root @ localhost media] # ls
RHEL_5.1 i386 DVD
[Root @ localhost media] # cd RHEL_5.1 \ i386 \ DVD/
[Root @ localhost RHEL_5.1 i386 DVD] # ls
[Root @ localhost RHEL_5.1 i386 DVD] # cd Server/

[Root @ localhost Server] # ls tftp *
Tftp-0.42-3.1.i386.rpm tftp-server-0.42-3.1.i386.rpm

Run the installation command
[Root @ localhost Server] # rpm-ivh tftp-server-0.42-3.1.i386.rpm
Warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Error: Failed dependencies:
Xinetd is needed by tftp-server-0.42-3.1.i386

Prompt for InstallationXinetd, Find the installation package and install

[Root @ localhost Server] # ls xinet *
Xinetd-2.3.14-10.el5.i386.rpm

[Root @ localhost Server] # rpm-ivh xinetd-2.3.14-10.el5.i386.rpm
Warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: xinetd ####################################### #### [100%]

Run the TFTP installation command.
[Root @ localhost Server] # rpm-ivh tftp-server-0.42-3.1.i386.rpm
Warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: tftp-server ##################################### ###### [100%]

Create a tftp master working directory
[Root @ localhost Server] # mkdir/tftpboot

Modify configuration file

[Root @ localhost Server] # vi/etc/xinetd. d/tftp

Note the following two points:

# 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/Tftpboot
Disable =No
Per_source = 11
CPIs = 100 2
Flags = IPv4
}

Restart service

[Root @ localhost Server] #/etc/init. d/xinetd restart
Stopping xinetd :[FAILED]
Starting xinetd :[OK]

Check whether startup is enabled
[Root @ localhost Server] # netstat-a | grep tftp
Udp 0 0 *: tftp *:*
Ii. NFS Installation

Network File System (NFS) is a mechanism for attaching partitions (directories) on a remote host to a local Network, you can operate on the shared partition (directory) of the remote host on the local system, similar to the shared directory of windows.

View the installation version
[Root @ localhost Server] # rpm-q nfs-utils-1.0.9-24.el5.i386.rpm
Package nfs-utils-1.0.9-24.el5.i386.rpm is not installed

Not Installed. Find the appropriate RPM installation package from the CD and install it.
[Root @ localhost Server] # rpm-ivh nfs-utils-1.0.9-24.el5.i386.rpm
Warning: nfs-utils-1.0.9-24.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
Package nfs-utils-1.0.9-24.el5 is already installed

NFS configuration, adding directories and access permissions that allow access from other computers
[Root @ localhost Server] # vi/etc/exports

Example
/Home 192.168.1. * (rw, sync, no_boot_squash)

1. home: directory accessible to other computers

2. 192.168.1. *: The Client IP address that is allowed to access the Directory

3. Rw: readable and writable

4. no_boot_squash: indicates that the root user of the client has the write permission on the directory.

Start the NFS server

[Root @ localhost Server] #/etc/init. d/nfs start
Starting NFS services: exportfs:/etc/exports: 1: unknown keyword "no_boot_squash"
[FAILED]
Starting NFS quotas :[OK]
Starting NFS daemon :[OK]
Starting NFS mountd :[ OK]

Restart the NFS server
[Root @ localhost Server] #/etc/init. d/nfs restart
Shutting down NFS mountd :[OK]
Shutting down NFS daemon :[OK]
Shutting down NFS quotas: [OK]
Shutting down NFS services:[FAILED]
Starting NFS services: exportfs:/etc/exports: 1: unknown keyword "no_boot_squash"
[FAILED]
Starting NFS quotas :[OK]
Starting NFS daemon :[OK]
Starting NFS mountd :[OK ]

Finally, use the mount command to mount the shared directory on the NFS server.

# Mount-t nfs servername:/shared_dir/localdir
For example:

# Mount-t nfs 10.168.1.100:/home/mnt/nfs

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.