Suse creates an NFS shared folder
Suse creates an NFS shared folder
Server Configuration:
1. Edit the nfs service configuration file
/software/suse11 *(rw,sync,no_root_squash,no_all_squash)
Note:
/Software/suse11 is the directory to be shared
* Indicates the IP address range that can be accessed. All IP addresses can be accessed here. Of course, you can also enter the machine name to replace it. Or 192.168.5.0/24 to specify the IP address range or
Machine name, which can contain wildcards.
No_all_squash retains the UID and GID of the shared file (default)
No_root_squash indicates that the root user has full management access permissions to the root directory.
The above configurations are classic and won't be verified directly during client access.
2. Start Related Services
/etc/init.d/nfsserver start
Note: nfsserver is the nfsd service in suse.
Ps-A # Check whether nfsd process showmount-e # Check the existing shared directory
3. After the service is started, the configuration file is modified.
If you have modified the/etc/exports file, you do not need to restart the nfsserver service. Run
Exportfs-rv, # r indicates restart, v indicates display of export options
4. Open the firewall port:
Tcp/udp port: 111,2049,
Udp port: 6000,6001
Client Configuration:
1. Mount the nfs directory on the server
Mount-t nfs 192.168.5.10:/pb/res/mnt2. if you want to automatically mount the nfs when the machine is started, add the preceding command to the Startup Script: Modify/etc/init. d/after. add local
mount -t nfs 192.168.5.10:/pb/res /mnt
Of course, you can also directly write the NFS directory to/etc/fstab. The disadvantage is that if the server is not started when the client is started, an error will occur.