Skip to main content
  1. Posts/

NFS Share Setup CentOS

·183 words·1 min
Guides CentOS NFS server CentOS
Nathan Higley
Nathan Higley
just a guy who likes cyber
Table of Contents

CentOS NFS Share Setup

Misc Things

Get temporary network:

sudo dhclient

Reboot faster:

sudo init 6

Format /dev/sdb

Install rpmfusion for exfat support.

sudo dnf install –nogpgcheck sudo dnf install –nogpgcheck sudo dnf config-manager –enable PowerTools sudo dnf update sudo dnf install exfat-utils fuse-exfat

Format drive:

sudo mkfs.exfat /dev/sdb


sudo mkdir /mount-point

sudo mount /dev/sdb /mount-point

Setup fstab entry:

sudo vim /etc/fstab

/dev/sdb    /mount-point  exfat rw,async,umask=0 0 0

Setup NFS

Tutorial used: Setting Up an NFS Server and Client on CentOS 7.2

  1. Install software

yum install nfs-utils

  1. Setup Startup Scripts

systemctl enable nfs-server.service

systemctl start nfs-server.service

  1. Setup NFS Make the config

sudo vim /etc/export:

/mount-point, no_squash_root), no_squash_root)

Export the config:

sudo exportfs -a

Those IP’s should now have read/write access to the share.

Update SELinux Boolean:

sudo setsebool -P nfs_export_all_rw 1

  1. Setup final networking

Setup Static IP on CentOS:

Edit Networking config:

sudo vim /etc/sysconfig/network-scripts/ifcfg-<interfacename>


Allow through firewall:

Use this command to find ports

rpcinfo -p

Then enable the ports:

firewall-cmd –permanent –add-port=<portnumber>/<tcp or udp>

firewall-cmd –reload