1.NFS共享文件server端的配置(server ip:172.16.8.11)
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# firewall-cmd --permanent --add-service=mountd
success
[root@localhost ~]# firewall-cmd --permanent --add-service=rpc-bind
success
[root@localhost ~]# firewall-cmd --permanent --add-service=nfs
success
[root@localhost ~]# firewall-cmd --reload
success
[root@localhost ~]# mkdir /xx
[root@localhost ~]# vi /etc/exports
[root@localhost ~]# cat /etc/exports
/xx 172.16.8.12/24(rw,sync) ------如果是共享到所有客户端,可将IP地址改为*
[root@localhost ~]# yum -y install nfs-utils
[root@localhost ~]# systemctl start rpcbind nfs-server
[root@localhost ~]# systemctl enable rpcbind nfs-server
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
[roo