顯示頁面 舊版 反向連結 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ======= NFS ======= ====== Server ====== ===== exports ===== create folder for exporting <code> mkdir -p /home/nfs/public /home/nfs/private </code> vi ''/etc/exports'' <code> /home/nfs/public -maproot=root -network=140.116.245.193/26 /home/nfs/private -maproot=root -ro -network=140.116.245.193/26 </code> everytime exports is edited, use ''service mountd reload'' to reload if ufs is used, without adding new disk, bind folder to folder like so: <code> mkdir -p /var/nfs/public mkdir -p /var/nfs/private vi /etc/fstab </code> add following content to fstab, and remount by doing ''mount -a'' <code> /var/nfs/public /usr/home/nfs/public nullfs rw 0 0 /var/nfs/private /usr/home/nfs/private nullfs rw 0 0 </code> if zfs is used, edit exports at ''/etc/zfs/exports'', the exported path needs to be zfs dataset. <code> zfs create zroot/usr/home/nfs zfs create zroot/usr/home/nfs/public zfs create zroot/usr/home/nfs/private </code> ==== service config ==== add following to rc.conf <code> rpcbind_enable="YES" nfs_server_enable="YES" mountd_enable="YES" mountd_flags="-r" </code> ==== start service ==== start nfs server <code> service nfsd start </code> ====== Client ====== ===== Service config ===== <code> sysrc nfs_client_enable="YES" </code> ==== Start NFS client ==== <code> service nfsclient start </code> ===== Mount on startup ===== add following content into ''/etc/fstab'' <code> # nfs 10.0.15.31:/home/nfs/public /home/nfs/public nfs rw,vers=3,proto=tcp 0 0 10.0.15.31:/home/nfs/private /home/nfs/private nfs rw,vers=3,proto=tcp 0 0 </code> create directory to be mount <code bash> mkdir -p /home/nfs/public /home/nfs/private </code> ===== Showmount ===== <code> showmount <servername> -e </code>