Skip to content

Deploy NFS Service⚓︎

1 Install and deploy NFS server⚓︎

1.1 Enviroment information⚓︎

  • Information of NFS server:

1.2 Install dependencies⚓︎

yum -y install epel-release

1.3 Install dependencies package of NFS⚓︎

yum -y install nfs-utils rpcbind

1.4 Start NFS⚓︎

systemctl enable rpcbind nfs-server nfs-lock nfs-idmap
systemctl start rpcbind nfs-server nfs-lock nfs-idmap

1.5 Configure firewall⚓︎

firewall-cmd --add-service=nfs --permanent --zone=public
firewall-cmd --add-service=mountd --permanent --zone=public
firewall-cmd --add-service=rpc-bind --permanent --zone=public
firewall-cmd --reload

1.6 Configure NFS⚓︎

mkdir /data
chmod 777 -R /data

vi /etc/exports
# Set NFS access permissions. The '/data' was created and will be shared. Use 192.168.100.* to indicate that all assets within 192.168.100.* have the permissions specified in the parentheses.
# Alternatively, you can specify specific authorized objects like this: /data,sync,no_root_squash),sync,no_root_squash)
/data 192.168.100.*(rw,sync,all_squash,anonuid=0,anongid=0)

1.7 Make exports configuration to take effect⚓︎

exportfs -a