First, you must be clear:The NFS service is shared between linux and linux.
Two things we need to do before configuring any service:
Iptables-F
Setenforce 0 NFS service kernel firewall has little impact, mainly iptables
Server:
InstallNfsService software package:
Start nfs service
The following describes a solution that the NFS service cannot afford. This error is still common.
Error: RPC ..... The problem is that I disabled rpc:
Enable and restart the rpc service:
Server shared/mnt all hosts (read-only)
Client Terminal is white
First, identify whether a directory is shared on the server.
Then we mount the file:
Because the permission we grant is read-only, we cannot write it in:
When it comes to client mounting, there are also two common problems: (error case column)
This is also wrong. The ip address is preceded //. Domain Name Service failed. The shared directory cannot be found.
Second, if no error is reported, say:
NO ROUTE TO HOSTNo route arrives at the host
(Server iptables-FSolve the problem that the fire wall is not cleaned)
Write permissions granted by the server:
Client:
You can create a file. Pay attention to the permission to view the file.
Server: (access the nfs service shared directory as root without converting the root permission)
Client: file1
Server: Access nfs using the user identity with uid 500
File Created on the client is viewed on the server: file2
Note: the client does not have this user. We use the user uidIt is also a server user. Only nobody is displayed in the customer ticket.The client only uses nfsThey will not view the permissions of files, but the permission management is still performed by the server.
To change the root permission, we do not specify the user identity to access nfs. The default file identity is nfsnobody.
Convert the identities of all users, all with uidIs 500To access nfs.
For more writing methods, refer to help
Configure the server to share the Domain Name:
If the following problem occurs: the client cannot be mounted
Go to the server to configure domain name, ip resolution
The client does not need to be configured, and then OK