Linux NFS Server installation and configuration ideas, linuxnfs
I. Advantages and disadvantages of the nfs service
NFS is short for Network File System. It allows different clients to mount and use the same directory as shared storage. This ensures data consistency between clients on different nodes, frequently Used in cluster architecture
NFS advantages: simple, convenient, reliable, and stable
Disadvantages of NFS:
1. spof
2. in highly concurrent environments, NFS performance is limited (websites with a pv of tens of millions are not bottlenecks, and tens of millions of PVS per day)
3. Difficult connection management and maintenance when multiple clients mount the NFS service
4. NFS data is in plain text, and data integrity is not verified.
Ii. installation and configuration ideas
NFS server
1. view the system version
2. Check and install the nfs service.
Note: The CentOS 5.x NFS service is portmap and nfs-utils.
CentOS 6.7 NFS services include rpcbind and nfs-utils.
3. Start the rpc and nfs services and check
4. Set Automatic startup and check
5. Configure the shared directory
6. Create a shared directory
7. Reload and check the nfs service
NFS client
1. view the system version
2. Install and check the rpc service
3. Start the rpc service and check
4. Set Automatic startup and check
5. Check the nfs server
6. Mount and Test
Iii. Server Configuration
The NFS service configuration file is/etc/exports.
/Etc/exports file content format:
Output directory address (permission)
24 is equivalent to 255.255.255.0
Rw: read/write permission
Iv. Permission Analysis
1. Check for common users during Client Connection
A. if the identity of a common user is clearly set, the identity of the client user is converted to the specified user;
B. If the NFS server has a user with the same name, the identity of the client Logon account is converted to the user with the same name on the NFS server;
C. If no user with the same name is specified, the user identity will be compressed into nfsnobody;
2. Check root during Client Connection
A. If no_root_squash is set, the root user's identity will be compressed to the root on the NFS server;
B. If all_squash, anonuid, and anongid are set, the root identity is compressed to the specified user;
C. If not explicitly specified, the root user is compressed into nfsnobody;
D. If both no_root_squash and all_squash users are specified, they will be compressed to nfsnobody. If anonuid and anongid are set, they will be compressed to the specified users and groups;