NFS

#############################nfs

yum install nfs-utils rpcbind -y

systemctl start rpcbind
systemctl status rpcbind

在NFS的服务端运行,启动服务
systemctl start nfs

rpcinfo -p

mkdir /nfsdata
chown -R nfsnobody:nfsnobody /nfsdata/

vi /etc/exports

/nfsdata 192.168.31.0/24(rw,sync)

/nfsdata 10.111.1.0/24(rw,sync)

client 需要 yum -y intall nfs-utils

mount -t nfs 192.168.31.81:/nfsdata/ /mnt

chown 权限问题,加上 no_root_squash 就可以了

[root@r16 /]# systemctl restart nfs
[root@r16 /]# more /etc/exports
/nfsdata 172.25.96.0/24(rw,sync,no_root_squash)
/nfsdata 10.0.0/8(rw,sync,no_root_squash)
/nfsdata 172.30.0.0/16(rw,sync,no_root_squash)
/v *(rw,sync,no_root_squash)
[root@r16 /]#

[root@k3 ~]# more /etc/exports
/nfsdata 192.168.0.0/16(rw,sync,no_root_squash)
/nfsdata 10.0.0.0/8(rw,sync,no_root_squash)
/nfsdata 172.16.0/16(rw,sync,no_root_squash)
/nfsdata 172.30.0.0/16(rw,sync,no_root_squash)
[root@k3 ~]#

Leave a Reply

Your email address will not be published. Required fields are marked *