1. Server1. 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. Client1. 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 Services1. 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:
|
<<: Detailed explanation of MySQL database index
>>: Vue+Echart bar chart realizes epidemic data statistics
1. parseFloat() function Make a simple calculator...
1. Download the MySQL jdbc driver (mysql-connecto...
1. Network Optimization YSlow has 23 rules. These...
Preface When I was browsing Xianyu today, I notic...
In HTML pages, visual elements such as buttons an...
1. Solution to the problem that the page is blank...
Format Encoding 1. Please set the page width with...
Windows: Support NTFS, FAT Linux supports file fo...
Table of contents 1. Cartesian product phenomenon...
I have been having this problem recently when desi...
1. Linux installation (root user operation) 1. In...
Preface Let’s take a look at the final effect fir...
Occasionally, I need to group select contents. In ...
This article shares the specific code of how to d...
Before the release of Microsoft IE 5.0, the bigges...