- Server Side (server.nfs.net)
- install
- yum install nfs-utils
- share /var/share
- mkdir /var/share
- chmod 755 /var/share
- chown nfsnobody:nfsnobody /var/share
- service
- systemctl start rpcbind
- systemctl start nfs-server
- systemctl enable rpcbind
- systemctl enable nfs-server
- vi /etc/exports
- /var/share *(ro,wdelay)
- /var/share client.nfs.net(rw,sync)
- restart
- systemctl restart nfs-server
- firewall
- firewall-cmd --permanent --add-service=nfs
- firewall-cmd --permanent --add-service=mountd
- firewall-cmd --permanent --add-service=rpc-bind
- firewall-cmd --reload
- Client Side (client.nfs.net)
- install
- yum install nfs-utils
- share mapping
- mkdir -p /mnt/nfs/var/share
- mount -t nfs server.nfs.net:/var/share /mnt/nfs/var/share
- vi /etc/fstab (optional, auto mount after reboot)
- server.nfs.net:/var/share /mnt/nfs/var/share nfs defaults 0 0
星期二, 3月 23, 2021
NFS on CentOS 7
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言