Server端的安裝

CentOS5
# yum install nfs-utils portmap
CentOS6
# yum install nfs-utils rpcbind

安裝完後,你會有個 /etc/exports,開始進行設定吧

# vi /etc/exports
/mnt/share       192.168.1.0/24(rw,sync)
/mnt/share       192.168.10.0/24(ro,no_root_squash)
/mnt/share       *(rw,sync,no_root_squash)

rw 可讀可寫
ro 只讀
async 先寫mem再寫入硬碟
no_root_squash 用root連就是root權限
root_squash 用root連還是nobody
all_squash 都是nobody
anonuid 指定nobody uid
anongid 指定nobody gid

設定開機啟動
# /etc/init.d/rpcbind start && chkconfig --level 2345 rpcbind on
# /etc/init.d/nfs start  && chkconfig --level 2345 nfs on

arrow
arrow
    全站熱搜

    痞客興 發表在 痞客邦 留言(0) 人氣()