Server-side
Yum Install Rpcbind-y
Yum Install Nfs-utils-y
Available Rpm-qa | grep NFS & RPM-QA | grep rpcbind Query is installed
Service Rpcbind Start
Service NFS Start
Mkdir/share (Create Share)
Generate primary configuration file (/etc/exports)
Configure exports
/share 192.168.0.0/24 (RO) shared directory open network segment (permissions)
Does not take effect immediately after modifications are completed
You need to reload the exports file using the following command:
[[Email protected]]# exportfs-a
SHOWMOUNT-E//view your shared services by default
SHOWMOUNT-A//Display directory information that is already connected to the client
Client
Service Rpcbind Start
Service Nfslock Start
mkdir shareing Create mount Directory
SHOWMOUNT-E IP (Server for NFS)//view your shared services by default
first-class error printing: [email protected]~:clnt_create: RPC: Port Mapper Failure - unable to Receive: errno 113 (NoRoute tohost)
The second type of error printing: [email protected]~:RPC: program not registered
The first type of error is caused by two reasons.
① is due to the Rpcbind service not starting properly or the service is abnormal, in CentOS 6.3, the Portmap service is responsible for Rpcbind, which we can confirm through Yum install Portmap. The source server resolves the package to rpcbind itself.
② firewall configuration issues. Add the ports that are used by NFS and RPC services, such as 111, 2049, by modifying the/etc/iptables script directory. Or shut down the firewall directly (not recommended unless your virtual machine is on a secure LAN or the virtual machine is not used as a network server). It is also possible to configure and edit firewall rules (iptables) through a graphical interface. Note here that in CentOS 6.3, there are multiple iptables script files in the/etc directory, making sure to select IPV4 Related scripts (if you use IPV6, select the corresponding script modifications).
Mount NFS Ip:/share/shareing Mount
Umount/shareing un-mount
Linux Server for NFS installation