Fedora 27 – Configure NFS Server and Client

Two machines, a file server and a workstation..

File server AND workstation:

Add host name entries, :wq.

# vi /etc/hosts
192.168.1.127 FileServer
192.168.1.128 WorkStation

Install the required software, enable and start rpc bind.

# dnf -y install install nfs-utils libnfsidmap
# systemctl enable rpcbind
# systemctl start rpcbind
File Server:

Enable and start the RPC and NFS services

# systemctl enable nfs-server
# systemctl start nfs-server
# systemctl start rpc-statd
# systemctl start nfs-idmapd

On the file server create the NFS shares

# mkdir /export
# chmod 777 /export

Now add the share directory to the exports file and :wq. Be very careful with the spaces. Add a space and it can mean a whole different thing. No shit.

# vi /etc/exports
/export WorkStation(rw,sync,no_root_squash)

Export the shares

# exportfs -r

Note: If your firewall is running, you’ll need rules to allow mountd, rpc-bind, and nfs through.

Workstation:

You should see the shared file systems associated with this machine:

# showmount -e
Export list for WorkStation:
/export FileServer

Create a mount point

# mkdir /mnt/fileservershares

Add an automount entry to the end of autofs, :wq

# vi /etc/autofs
FileServer:/export /mnt/fileservershares nfs rw,sync,hard,intr,users 0 0

Done!

# reboot

Leave a Reply