差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
nfs [2017/01/10 22:59] jz [service config] |
nfs [2018/02/20 11:50] (目前版本) jz |
||
---|---|---|---|
行 7: | 行 7: | ||
create folder for exporting | create folder for exporting | ||
<code> | <code> | ||
- | mkdir -p /usr/home/nfs/public | + | mkdir -p /home/nfs/public /home/nfs/private |
- | mkdir -p /usr/home/nfs/private | + | |
</code> | </code> | ||
vi ''/etc/exports'' | vi ''/etc/exports'' | ||
<code> | <code> | ||
- | /usr/home/nfs/public -maproot=root -network=140.116.245.193/26 | + | /home/nfs/public -maproot=root -network=140.116.245.193/26 |
- | /usr/home/nfs/private -maproot=root -ro -network=140.116.245.193/26 | + | /home/nfs/private -maproot=root -ro -network=140.116.245.193/26 |
</code> | </code> | ||
行 62: | 行 61: | ||
====== Client ====== | ====== Client ====== | ||
- | ===== service config ===== | + | ===== Service config ===== |
<code> | <code> | ||
sysrc nfs_client_enable="YES" | sysrc nfs_client_enable="YES" | ||
</code> | </code> | ||
- | ==== start service ==== | + | ==== Start NFS client ==== |
- | start nfs client | ||
<code> | <code> | ||
service nfsclient start | 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> | </code> | ||