12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14• The rpcbind(8) daemon maps Remote Procedure Call (RPC) programnumbers to universal addresses and lets NFS clients know which ports theNFS server is using to serve requests.• The mountd(8) daemon processes incoming mount requests.Enabling the NFS server is as simple as adding appropriate variables to /etc/rc.conf, and starting the daemons (or restarting the server):rpcbind_enable="YES"nfs_server_enable="YES"Running NFS server is the easiest part. Now all you need to do is to specify whichresources should be shared (exported), as well as access policies for each export.This is done using the /etc/exports file. The /etc/exports file containsinformation about every resource you want to share, as well as some export optionsand the hosts you want to permit to have access to each resource.The above example shows the /etc/exports file that specifies threeexported directories./usr/ports/distfiles -network 192.168.11.0 -mask=255.255.255.0/cdrom -ro 192.168.0.14/public –ro –mapall=nobodyThe first line exports the /usr/ports/distfiles directory. The share is onlyaccessible for 192.168.11.0/24 subnet, and is exported with read/write permission(which is available by default).The second line in the above code, exports the /cdrom directory with read-onlypermission (hence the -ro parameter), only for the host 192.168.0.14.And the third line exports /public directory as read-only for any host, andeveryone can access the contents of this export with user access set to nobody. The-mapall=nobody maps all users to local user nobody.ClientFreeBSD can mount NFS shares using mount(8) or mount_nfs(8) utility. All youneed to do is to prepare the host to be able to mount NFS shares, by enabling NFSclient modules:nfs_client_enable="YES"Adding the above variable to the /etc/rc.conf file ensures that the currentoperating environment is prepared to mount NFS shares.[ 241 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!