linux nfs安裝記錄

來源:互聯網
上載者:User

標籤:linux   nfs   

Mark之


安裝:

yum -y install nfs-utils rpcbind


nfs伺服器配置:

/home/nfs 192.168.150.*(rw,sync,no_root_squash)


/home/nfs  本地路徑,可供其他使用者訪問的

192.168.150.*   此IP下連結的使用者才可以訪問

(rw,sync,no_root_squash)  PS:此處和IP地址沒有空格

rw:讀寫權限

sync:檔案同時寫入硬碟和記憶體

no_root_squash:root使用者被壓縮為nfs server的root使用者


啟動服務:

service nfs start

如果出現如下錯誤:

Starting NFS services:                                     [  OK  ]
Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
                                                           [FAILED]
Starting NFS mountd:                                       [FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
                                                           [FAILED]

RH系作業系統在6.0版本之後沒有portmap服務控制rpc的啟動,由於NFS和nfslock的啟動需要向rpc進行註冊,rpc不啟動的話就會報錯。

解決方案:啟動rpcbind&rpcidmap rpcbind是6.0版本後預設的RPC服務,所以要先於nfs啟動。如果不啟動rpcidmap則會造成使用者權限的映射錯誤,使用者的許可權看起來是一串數字。


[[email protected] ~]# /etc/init.d/rpcbind start
Starting rpcbind:                                          [  OK  ]
[[email protected] ~]# /etc/init.d/rpcidmapd start
Starting RPC idmapd:                                       [  OK  ]
[[email protected] ~]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]

引用自:http://www.linuxyw.com/a/yunweiguzhang/20130520/405.html



用戶端啟動:

/etc/init.d/rpcbind start


掛載

mount -t nfs 192.168.150.130:/home/nfs


非常簡單。


參考:http://www.it165.net/admin/html/201405/3177.html

linux nfs安裝記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.