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
This article uses an example to describe how to i...
In web page production, displaying and hiding ele...
I usually like to visit the special pages or prod...
Preface When installing the executable file of a ...
character Decimal Character Number Entity Name --...
Table of contents Summarize Sometimes we need to ...
Table of contents 1. Installation 2. Use Echarts ...
This article shares the use of js and jQuery tech...
The database installation tutorial of MySQL-8.0.2...
Background In a list like the one below, clicking...
MySQL is easy to install, fast and has rich funct...
HTML5 and jQuery implement the preview of local i...
Using the <img> element with the default sr...
environment name property CPU x5650 Memory 4G dis...
1: readonly is to lock this control so that it can...