Simply record the scripts to setup NFS in CentOS 8.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| sudo yum install nfs-utils -y systemctl enable rpcbind systemctl enable nfs-server systemctl start rpcbind systemctl start nfs-server
sudo mkdir /var/nfsshare tee -a /etc/exports << EOF /var/nfsshare 192.168.1.0/24(rw,sync,no_root_squash,no_all_squash) EOF
sudo firewall-cmd --zone=public --permanent --add-service=mountd sudo firewall-cmd --zone=public --permanent --add-service=rpc-bind sudo firewall-cmd --zone=public --permanent --add-service=nfs sudo firewall-cmd --reload
sudo setsebool nfs_export_all_ro on sudo setsebool nfs_export_all_rw on
|