Windows掛載NFS檔案系統

來源:互聯網
上載者:User

標籤:nfs   linux   windows   共用檔案   共用儲存   網路儲存   

主機

作業系統

IP地址

軟體包

NFS主機

Centos7.2

192.168.190.128

nfs-utils、rpcbind

Windows Client

Windows server 2008

192.168.190.129

網路檔案系統

 

註:以下實驗均關閉防火牆以及其它安全機制

 

NFS主機操作:

 

# 使用yum安裝nfs-utils和管理工具rpcbind

[[email protected] ~]# yum -y install nfs-utilsrpcbind

 

# 建立共用資料夾

[[email protected] ~]# mkdir /nfs

 

[[email protected] ~]# vim /etc/exports

# nfs是共用的目錄名,*是指所有主機,rw是指讀寫權限,如果需要唯讀可以改為ro

/nfs *(rw)

 

# 註:給需要共用的檔案設定存取權限,因為nfs會預設將所有的訪問使用者都映射到nobody使用者,但是我們剛剛建立的使用者對需要共用的檔案沒有存取權限,這裡設定為完全訪問,若需要再公網上使用則需要將使用權限設定為可以供生產環境使用即可

[[email protected] ~]# chmod 777 /nfs

 

[[email protected] ~]# systemctl start nfs.service

[[email protected] ~]# systemctl startrpcbind.service

 

Windows Server 2008 R2 操作:

 

開啟“控制台” → 點擊“角色” → 點擊“添加角色” → 點擊“下一步” → 點擊“檔案服務” → 點擊“下一步“ →點擊”下一布” → 選擇“網路檔案系統服務” → 點擊“下一步“ → 點擊”安裝“,如所示:

650) this.width=650;" src="https://s1.51cto.com/wyfs02/M02/96/2C/wKiom1kdk4-CGe_aAAF0mHbvrwk206.png" title="1.png" style="width:740px;height:416px;" hspace="0" height="416" border="0" width="740" vspace="0" alt="wKiom1kdk4-CGe_aAAF0mHbvrwk206.png" />


650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/96/2C/wKioL1kdk-LwAlmDAACN_ZBbKO8503.png" title="2.png" style="width:740px;height:548px;" hspace="0" height="548" border="0" width="740" vspace="0" alt="wKioL1kdk-LwAlmDAACN_ZBbKO8503.png" />


650) this.width=650;" src="https://s1.51cto.com/wyfs02/M00/96/2C/wKioL1kdk_rynGDEAACN_9lOrm4418.png" title="3.png" style="width:740px;height:540px;" hspace="0" height="540" border="0" width="740" vspace="0" alt="wKioL1kdk_rynGDEAACN_9lOrm4418.png" />


 

安裝完成後需要同時鍵入“Win + r”鍵開啟cmd

650) this.width=650;" src="https://s1.51cto.com/wyfs02/M01/96/2C/wKiom1kdlDyBV1ipAAC57-_XrfM221.png" title="4.png" style="width:740px;height:416px;" hspace="0" height="416" border="0" width="740" vspace="0" alt="wKiom1kdlDyBV1ipAAC57-_XrfM221.png" />

# 註:192.168.190.128是nfs伺服器的地址,/nfs是伺服器的共用目錄,X是nfs在windows中的掛載點

輸入:mount 192.168.190.128:/nfs X:

650) this.width=650;" src="https://s5.51cto.com/wyfs02/M02/96/2C/wKioL1kdlGnAaRV0AADAZ8NWWSY440.png" title="5.png" style="width:730px;height:451px;" hspace="0" height="451" border="0" width="730" vspace="0" alt="wKioL1kdlGnAaRV0AADAZ8NWWSY440.png" />

 

開啟電腦探索已經掛載成功

650) this.width=650;" src="https://s3.51cto.com/wyfs02/M01/96/2D/wKiom1kdlIqjK5owAAFSc-YkqGQ238.png" title="6.png" style="width:740px;height:416px;" hspace="0" height="416" border="0" width="740" vspace="0" alt="wKiom1kdlIqjK5owAAFSc-YkqGQ238.png" />

 

若要開機自動掛載可以點擊“電腦” → 點擊“映射網路磁碟機” → “輸入網際網路共用檔案路徑“ → ”完成“

650) this.width=650;" src="https://s5.51cto.com/wyfs02/M02/96/2D/wKiom1kdlKLiA8HpAAGBbHgAyn8326.png" title="7.png" style="width:740px;height:416px;" hspace="0" height="416" border="0" width="740" vspace="0" alt="wKiom1kdlKLiA8HpAAGBbHgAyn8326.png" />

 

重啟之後發現共用檔案Z依然是掛載狀態

650) this.width=650;" src="https://s1.51cto.com/wyfs02/M02/96/2C/wKioL1kdlMCBpE5CAAFdwiq4GaU193.png" title="8.png" style="width:740px;height:416px;" hspace="0" height="416" border="0" width="740" vspace="0" alt="wKioL1kdlMCBpE5CAAFdwiq4GaU193.png" />

    最近公司要求使用nfs就簡單的搭了一下,簡單的做了一下記錄

本文出自 “linux” 部落格,請務必保留此出處http://bella41981.blog.51cto.com/10603572/1927315

Windows掛載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.