Background
I want to deploy the NFS service on FreeBSD and make it available to my mac.
Device info
- macOS
OS version: 10.15.7
ip: 192.168.1.88
username: puffin - FreeBSD OS version: 13.2-RELEASE ip: 192.168.1.99
Configure NFS
We configure NFS on the FreeBSD with following steps:
setup the /etc/rc.conf
setup the file and add configuration of NFS.
-
change the file
/etc/rc.confas follows:1vim /etc/rc.conf -
add following lines:
1 2 3 4 5nfs_server_enable="YES" nfs_server_flags="-u -t -n 4" rpcbind_enable="YES" mountd_flags="-r" mountd_enable="YES"
setup the /etc/exports
-
change the file
/etc/exportsas follows:1vim /etc/exports -
add following lines:
⚠️ the parameter
-mapall=puffinshould be the username of my mac, and the ip192.168.1.88should be the same as the one in my mac.1/mnt/data/nfs -mapall=puffin -alldirs 192.168.1.88
Start NFS
Start Service
|
|
Reload mountd after change the configuration
|
|