Set up tftp and nfs in Linux

Source: Internet
Author: User
Tags sendmsg
In Linux, the establishment of tftp and nfs-Linux Enterprise Application-Linux server application information is as follows. A while ago, I had to reinstall the Linux system, and the software I installed was gone. Now I have to re-build the Linux environment. It is really troublesome. After a long time, I can't remember how to build it. It took a big afternoon to install tftp and nfs, as well as the cross-compiler. To prevent the occurrence of this problem again, next, we will record the steps for setting up tftp and nfs and the problems encountered. Because the installation of the cross compiler is relatively simple, there is usually no problem, so we will not talk about it here.

I. Install tftp
Install tftp first to install xinetd, I installed a xinetd-2.3.14-11.i386.rpm, with rpm can be quickly installed, then install tftp-server, because the uboot In the s3c2410 has implemented the tftp-client, so just download the tftp-server package, I downloaded the tftp-server-0.42-4.i386.rpm, also directly with rpm installation on the line. After installation, configure the/etc/xinetd. d/tftp file.

Service tftp
{
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/tftp/tftpboot // tftp/tftpboot can be defined by yourself, but do not write it in the/***** format.
Disable = no // change yes to no
Per_source = 11
CPIs = 100 2
Flags = IPv4
}

Finally, start the tftp service: service xinet restart

Problem: TTTT keeps appearing in uboot when the command tftp 0x31000000 zImage. img is used. At that time, my server_args was set to/tftpboot. What I don't understand is that I can set server_args to/tftp/tftpboot to download it. I still don't know why, so I will write it for the moment, if you understand it, try again.

2. Install nfs
The FS installation is very simple. It only requires two software packages. In general, it is installed as the default package of the system, before configuring NFS, check whether the required software package is installed.

# Rpm-q nfs-utils portmap

Nfs-utils-1.0.6-70.EL4

Portmap-4.0-63

// If the package information is displayed, the nfs-utils portmap packages are installed.

My system is FC7, only nfs-utils is installed by default, and portmap is not installed, I got a portmap-4.0-65.i386.rpm and can be installed quickly with rpm.

In the configuration file/etc/exports, there is nothing in the beginning. Enter:

/Nfs/nfsroot * (rw, sync, no_root_squash)

You can customize/nfs/nfsroot.

Now you can start the nfs service. However, you must first start portmap (service protmap restart) and then start nfs (service nfs start). You can view the current state of nfs through service nfs status.

Problems encountered:
[Tekkaman2410 @ UP-NETARM2410-S] # mount-t nfs 192.168.253.111:/nfs/nfsroot/mnt
RPC: sendmsg returned error 101.
Portmap: RPC call returned error 101.
RPC: failed to contact portmap (errno-101 ).
RPC: sendmsg returned error 101.
Portmap: RPC call returned error 101.
RPC: failed to contact portmap (errno-101 ).
Lockd_up: makesock failed, error =-101
RPC: sendmsg returned error 101.
Portmap: RPC call returned error 101.
RPC: failed to contact portmap (errno-101 ).

Solution: restart the portmap and nfs services.

Additional issues include:

1. fs type nfs no supported by kernel
Kernel does not support the nfs file system. Re-compile the KERNEL to solve the problem.

2. cant contact portmapper: RPC: Remote system error-Connection refused
This error message is displayed because the PORTMAP on the SEVER side is not started.

3. mount clntudp_create: RPC: Program not registered
NFS is not started. You can run the showmout-e host command to check whether the nfs server is started normally.

4. mount: localhost:/home/test failed, reason given by server: Permission denied
This prompt may appear when the client wants to mount the nfs server. It means that the local machine has no permission to mount the directory on the nfs server. The solution is to modify the nfs server.

5. blocked by the firewall
Many people have neglected this reason. in a network environment with strict requirements, we usually close all ports on linux and open them only when any port is needed. NFS uses port 111 by default, so we must first check whether this port is enabled, and also check the TCP_Wrappers settings.
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.