Linux builds NFS server In order to achieve data sharing among different operating systems, we usually build some servers for file sharing. NFS server is one of them, which realizes sharing between Linux and Linux. Today I will share the steps on how to build an nfs server on a linux system for your reference. Build steps 1. Install the required software packages for nfs yum install rpcbind nfs-utils 2. Create a test file and assign permissions mkdir /home/test chmod -R 777 /home/test/ cd /home/test/ vim aaa/bbb.txt 3. Modify the configuration file vim /etc/exports Write /home/test 192.168.121.0/24 (rw) The shared file path allows the shared network segment (shared file executable permissions) The shared file executable permissions are: ro Read-only access rw Read-write access sync All data is written to the share on request hide Do not share subdirectories in the NFS shared directory no_hide Share subdirectories of the NFS directory all_squash UID and GID mapping of shared files to anonymous users anonymous, suitable for public directories. no_all_squash preserves the UID and GID of shared files (default) root_squash All requests of the root user are mapped to the same permissions as the anonymous user (default) no_root_squas The root user has full administrative access to the root directory 4. Start the service systemctl start rpcbind nfs Set the system to start automatically at boot echo "192.168.121.38:/home/test /nfs nfs4 defaults 0 0" >> /etc/fstab mount -av 5. View shared information showmount -e 192.168.121.38 (the IP address here is the host address of the server) 6. Access the nfs server mount 192.168.121.38:/home/test/ /mnt/ df Summarize This is the end of this article about how to build an NFS file sharing server in Linux. For more information about building an NFS server in Linux, please search for 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:
|
<<: Four methods of using JS to determine data types
>>: Detailed summary of mysql sql statements to create tables
Table of contents Preface The role of deconstruct...
Table of contents 1. Install Docker 2. Write code...
Vue front and back end ports are inconsistent In ...
Six steps to install MySQL (only the installation...
1. First create the file (cd to the directory whe...
Table of contents 1. Software Package 2. Install ...
Table of contents 1. Introduction 2. Aggregation ...
This article records the installation and configu...
MySQL paging queries are usually implemented thro...
This article shares the specific code of js+canva...
0x0 Test Environment The headquarters production ...
Table of contents Preface Virtual DOM What is Vir...
Nginx supports three ways to configure virtual ho...
This article shares the specific code for JavaScr...
This article example shares the specific code of ...