How to configure NFS Storage Server on Centos 7

CentOS 7 Tutorial–Hello everyone, currently I am playing a lot with my CentOS 7 server. I have several CentOS 7 server installed locally on our Proxmox VE server and also I have a CentOS 7 running on DigitalOcean. Today, I will continue to give a short tutorial how to┬áturn CentOS 7 into a powerful storage server via NFS (Network File System). For more information about NFS Server, you may want to have a look at this Wiki page.

Steps to configure NFS Server on CentOS 7

Step 1. Install nfs-utils

yum install nfs-utils

Step 2. Configure idmapd.conf

Next we need to configure some stuffs in order to get the NFS Server up and running.

nano /etc/idmap.conf

Uncomment and change the domain name with your own. For example in my case:

Domain = gamblisfx.local

Step 3. Configure exports

mkdir /mnt/nfs01
nano /etc/exports

In this example I want to use /mnt/nfs01 to be exported as NFS volume. So, we add the following line to the exports.

/mnt/nfs01 10.34.0.0/24(rw,no_root_squash)

Step 4. Enable service and configure firewall

Now we can start the service

systemctl start rpcbind nfs-server 
systemctl enable rpcbind nfs-server

Allow NFS service

firewall-cmd --add-service=nfs --permanent 
firewall-cmd --reload

Done. Thank you for coming and share this article if you found its useful. You may want to check out some other CentOS Storage tutorial below:

Admin

Leave a Reply

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