Lets begin:
- % su
- # echo 'nfs_server_enable="YES"' >> /etc/rc.conf
- # echo 'rpcbind_enable="YES"' >> /etc/rc.conf
- # echo 'mountd_flags="-r"' >> /etc/rc.conf
- # echo 'rpc_lockd_enable="YES"' >> /etc/rc.conf
- # echo 'rpc_statd_enable="YES"' >> /etc/rc.conf
Lets proceed by identifying what we want to share:
- % su
- # vi /etc/exports
- add the following line:
/usr/ports/distfiles -network 192.168.1 -mask 255.255.255.0Step 3 shares the /usr/ports/distfiles directory and make it available to any client with an IP address beginning in 192.168.1 and netmask of 255.255.255.0.
Now that we've enabled the NFS server settings and configured the exports file, lets start the server by:
- % su
- # rpcbind
- # nfsd -u -t -n 4
- # mountd -r
- % su
- # /etc/rc.d/mountd onereload
- % su
- # showmount -e
source
Niciun comentariu:
Trimiteți un comentariu