Introduction to NFS service construction under Centos7

Introduction to NFS service construction under Centos7

1. Server

1. Download NFS related services using YUM source

2. Create a shared directory and write the shared directory in the NFS related configuration file

3. Use exportfs to make the settings take effect immediately

4. Restart NFS related services

5. Use the showmount command to test the NFS output directory status

2. Client

1. Download NFS related services

2. Check which shared directories on the server IP allow clients to connect

3. Create a client directory and mount the server's output directory under the client directory

3. Testing Services

1. Restart the NFS service on the server and give the server the required permissions for the output directory

2. Enter the output directory on the server and create a file

3. Return to the client to restart the NFS service and enter the client's mount directory to view the files written by the server

At this point, the NFS service is set up. Supplement:

rw # The client can read and write to the shared directoryro # The client can only read but not write to the shared directorysync # Synchronous mode, that is, writing the data in the memory to the hard disk in real time, but this will reduce disk efficiencyasync # Asynchronous mode, that is, writing the data in the memory to the hard disk at regular intervals, which can ensure disk efficiency, but when there is an abnormal crash/power outage, the data in the memory will be lostno_root_squash # After the client mounts the NFS shared directory, the root user on the client is not restricted by these mount options and has great permissionsroot_squash # In contrast to no_root_squash, the root user on the client is restricted by these mount options and is treated as an ordinary userall_squash # All users on the client are limited to an ordinary user when using the NFS shared directoryanonuid # The above squashes are used to limit the client's users to ordinary users, and anouid is used to limit the uid of this ordinary user. This uid corresponds to the /etc/passwd file on the server, such as: anouid=1000
                  # For example, if I use the user xiaoming to create a file on the client, when the server synchronizes the file, the owner of the file will become the user anongid corresponding to the server's uid (1000) # Same as above, used to limit the gid of this ordinary user

This is the end of this article about setting up NFS service under Centos7. For more related Centos7 NFS service content, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Centos8 builds nfs based on kdc encryption
  • Introduction to the process of using NFS remote directory mounting in CentOS environment
  • Complete steps to build NFS file sharing storage service in CentOS 7
  • How to set up NFS file sharing in CentOS 6.8
  • Tutorial on installation and configuration of NFS service under CentOS6.9
  • Centos7 installation and configuration of NFS service and mounting tutorial (recommended)
  • Steps for using and configuring NFS under centos7

<<:  Detailed explanation of MySQL database index

>>:  Vue+Echart bar chart realizes epidemic data statistics

Recommend

How to remove the dotted border when clicking a link in FireFox

I encountered several browser compatibility issue...

Share some uncommon but useful JS techniques

Preface Programming languages ​​usually contain v...

Steps to install MySQL 5.7.10 on Windows server 2008 r2

Install using the MSI installation package Downlo...

HTML Table Tag Tutorial (47): Nested Tables

<br />In the page, typesetting is achieved b...

How to generate mysql primary key id (self-increment, unique and irregular)

Table of contents 1. Use the uuid function to gen...

HTML 5 Reset Stylesheet

This CSS reset is modified based on Eric Meyers...

js to achieve a simple carousel effect

This article shares the specific code of js to ac...

An example of the difference between the id and name attributes in input

I have been making websites for a long time, but I...

JavaScript object built-in objects, value types and reference types explained

Table of contents Object Object Definition Iterat...

Let's talk in detail about the difference between unknown and any in TypeScript

Table of contents Preface 1. unknown vs any 2. Th...

In-depth understanding of Vue transition and animation

1. When inserting, updating, or removing DOM elem...

The webpage cannot be opened because the div element lacks a closing tag

At first I thought it was a speed issue, so I late...

Native js drag and drop function to create a slider example code

Drag and drop is a common function in the front e...

The whole process of installing mysql5.7.22 under ARM64 architecture

MySQL download address: https://obs.cn-north-4.my...