Server 192.168.1.15
client 192.168.1.157
1 server installation process
1. Download nfs-utils and the rpcbind yum install -y nfs-utils rpcbind
2. Start rpcbind (must start) systemctl start rpcbind
3. Start nfs-utils systemctl start nfs
4. Check process
ps aux | grep nfs
ps aux | grep rpcbind
5. Set the boot from the start
systemctl enable rpcbind
systemctl enable nfs
6. Review the situation from the start systemctl list-unit-files --type=service|grep "enabled"|egrep "rpcbind|nfs"
7. Create a directory mkdir /data
8. permission to chown -R nfsnobody.nfsnobody /data
9. Configure shared directory
cat>>/etc/exports<<EOF
> #NFS server share directories
> /data 192.168.1.0/24(rw,sync)
> EOF
10. GR NFS systemctl reload nfs
11. The view remounting showmount -e 192.168.1.158(服务端Ip)
12. Close firewall
systemctl stop firewalld
setenforce 0
13 to / data directory permissions pluschmod 777 /data
2 client installation
1. Download yum install nfs-utils rpcbind -y
2. Start rcpbind (do not start nfs) systemctl start rpcbind
3. set the boot from the start systemctl enable rpcbind
4. Check local directory mount showmount -e 192.168.1.158
5. Set the boot automatically mount
mount -t nfs 192.168.1.158:/data /mnt
echo "mount -t nfs 192.168.1.158:/data /mnt">>/etc/rc.local
6. Review df -h
7. turn off the firewall
systemctl stop firewalld
setenforce 0