Service side:
[Email protected] tmp]# Rpm-qa | grep NFS
Nfs-utils-lib-1.0.8-7.6.el5
NFS-UTILS-1.0.9-44.EL5//Provide file system
System-config-nfs-1.3.23-1.el5
[Email protected] tmp]# Rpm-qa | grep Portmap
portmap-4.0-65.2.2.1//RPC protocol provided
[Email protected] tmp]#/etc/init.d/nfs restart
[Email protected] tmp]#/etc/init.d/portmap restart
[[email protected] tmp]# vim/etc/exports//config file, start is empty file
/tmp 192.168.1.0/24 (Ro,no_root_squash)//shared directory shared network segment (attributes after sharing)
[[email protected] tmp]# showmount-a//View the client that has mounted the shared directory/general on the server using all mount points on Localhost.localdomain:
192.168.1.200:/tmp
Client:
[Email protected] opt]# mount-t NFS 192.168.1.250:/tmp/opt
-t specifies the file system type
AutoFS Auto Mount:
Vim/etc/auto.master
/mynfs/etc/auto.nfs
Vim/etc/auto.nfs
Haha-fstype=nfs 192.168.1.250:/tmp
mkdir Mynfs
/etc/init.d/autofs restart
[Email protected] opt]# showmount-e 192.168.1.250
Export list for 192.168.1.250:
/TMP 192.168.1.0/24//client can view the share of the server