Install NAS on FreeBSD:


This is using my web server folder as an example.

First change the folder you want to share so everyone can edit it:
sudo chmod -R 777 /usr/local/www/apache24/data/

Then in the /etc/rc.conf file, add these lines:
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r"
portmap_enable="YES"

Then create this folder through this command:
touch /etc/exports

then enable and start nfs services:
service nfsd enable
service mountd enable
service nfsd start
service mountd reload

Then add the folder you want to export and the client who can see it:
sudo nano /etc/exports

Add this line (this limits to only my laptop on wired and WiFi:
/usr/local/www/apache24/data 192.168.0.19 192.168.0.199

save then type this to full add it:
sudo service mountd reload

see if folder successfully exported:
showmount -e

Then mount on client through this (on any Unix/Linux os:
sudo mount 192.168.0.3:/usr/local/www/apache24/data /home/mii/Web_Server_NAS


-------------------------------------
Date: Feb 13th, 2021

Back