Analysis of installation and configuration of Linux NFS server _linux

Source: Internet
Author: User
Tags server installation and configuration centos

One, NFS services pros and cons

Introduction to NFS Services

NFS is the abbreviation for Network file system, which is the network filesystem. An agreement for the decentralized file system, developed by Sun, was released in 1984. The function is to allow different machines, different operating systems to share individual data with each other through the network, so that the application can access the data on the server disk through the network, it is a way to realize disk file sharing between Unix-like systems.

The basic principle of NFS is "to allow different clients and services to share the same file system through a set of RPC", which is independent of the operating system, allowing different hardware and operating system systems to share files.

NFS relies on the RPC protocol during file transfer or information transfer. RPC, remote procedure invocation (Procedure call) is a mechanism that enables clients to execute programs in other systems. NFS itself does not provide the protocol and functionality to transmit information, but NFS allows us to share information over the network because NFS uses some other transport protocol. And these transport protocols are used for this RPC functionality. It can be said that NFS itself is a program that uses RPC. Alternatively, NFS is also an RPC SERVER. So you start RPC services wherever you use NFS, whether it's NFS server or NFS CLIENT. This allows the server and client to implement the program Port's counterpart through RPC. You can understand the relationship between RPC and NFS: NFS is a file system, and RPC is responsible for the transmission of information.

Advantages of NFS: simple, convenient, reliable, stable

NFS Disadvantage:

1, there is a single point of failure

2, in the High Concurrency Environment, NFS performance is limited (tens of millions of PV Web site is not a bottleneck, 20 million pv/days)

3, multiple Clients mount NFS services, connection management maintenance trouble

4, NFS data is clear, the data integrity does not verify

System environment

System platform: CentOS release 5.6 (Final)

NFS Server ip:192.168.1.108

The firewall is closed/iptables:firewall is not running.

Selinux=disabled

Second, installation and configuration ideas

NFS Service Side

1, view the system version

2. Check and install NFS Services

Note: The CentOS 5.x NFS service is Portmap, nfs-utils

CentOS 6.7 NFS Service is for Rpcbind, nfs-utils

3. Start RPC, NFS service and check

4. Set boot up and check

5. Configure the shared directory

6. Create a shared directory

7. Reload NFS Services and check

NFS Client

1, view the system version

2. Install RPC service and check

3. Start RPC Service and check

4. Set boot up and check

5. Check Server NFS

6, Mount and test

Third, the server configuration

The configuration file for NFS services is/etc/exports

/etc/exports File Content format:

Output directory address (permissions)

24 equivalent to 255.255.255.0

RW: For read and Write permissions

Iv. Analysis of Competencies

1. When the client connects, the inspection to the ordinary user

A. If you explicitly set the identity of the ordinary user is compressed, then the identity of the client user is converted to the designated user;

B. If there is a user with the same name on the NFS server, then the client logon account is converted to a user of the same name above the NFS server;

C. If there is no explicit designation, there is no user with the same name, then the user identity is compressed into nfsnobody;

2. When the client is connected, check the root

A. If the No_root_squash is set, the root user's identity is compressed to root on NFS server;

B. If the All_squash, Anonuid, Anongid are set, the root status is compressed to the specified user;

C. If not explicitly specified, the root user is compressed to nfsnobody at this time;

D. If you specify both No_root_squash and All_squash users will be compressed to nfsnobody, if Anonuid is set, Anongid will be compressed to the specified user and group;

The above is a small series to introduce the Linux NFS server installation and configuration analysis, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.