nfs 網際網路共用

來源:互聯網
上載者:User

參考地址:http://www.linuxidc.com/Linux/2009-07/20998.htm

錯誤參考:http://liuzhigong.blog.163.com/blog/static/17827237520115305226932/

 $sudo aptitude install nfs-kernel-server

修改nfs設定檔/etc/exports,添加如下一行

/home/m/.wkl/soft *(insecure,rw,no_root_squash,no_subtree_check)

 

$sudo /etc/init.d/portmap start

# /etc/init.d/nfs-kernel-server restart //$sudo /etc/init.d/nfsstat start  

 

$sudo mount -o nolock 192.168.1.117:/home/m/.wkl/soft ~/wklshare  (wklshare需要建立 117為虛擬機器)

 

原文:http://general.blog.51cto.com/927298/354523
ro 唯讀訪問
rw 讀寫訪問
sync 所有資料在請求時寫入共用
async NFS在寫入資料前可以相應請求
secure NFS通過1024以下的安全TCP/IP連接埠發送
insecure NFS通過1024以上的連接埠發送
wdelay 如果多個使用者要寫入NFS目錄,則歸組寫入(預設)
no_wdelay 如果多個使用者要寫入NFS目錄,則立即寫入,當使用async時,無需此設定。
hide 在NFS共用目錄中不共用其子目錄
no_hide 共用NFS目錄的子目錄
subtree_check 如果共用/usr/bin之類的子目錄時,強制NFS檢查父目錄的許可權(預設)
no_subtree_check 和上面相對,不檢查父目錄許可權
all_squash 共用檔案的UID和GID映射匿名使用者anonymous,適合公用目錄。
no_all_squash 保留共用檔案的UID和GID(預設)
root_squash root使用者的所有請求映射成如anonymous使用者一樣的許可權(預設)
no_root_squas root使用者具有根目錄的完全管理存取權限
anonuid=xxx 指定NFS伺服器/etc/passwd檔案中匿名使用者的UID
anongid=xxx 指定NFS伺服器/etc/passwd檔案中匿名使用者的GID

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.