標籤:windows nfs 掛載
主機 |
作業系統 |
IP地址 |
軟體包 |
NFS主機 |
Centos7.2 |
192.168.190.128 |
nfs-utils、rpcbind |
Windows Client |
Windows server 2008 |
192.168.190.129 |
網路檔案系統 |
註:以下實驗均關閉防火牆以及其它安全機制
650) this.width=650;" title="金屬質感分割線" src="https://mmbiz.qpic.cn/mmbiz/cZV2hRpuAPjEIibB1UYw1VMPzscNxReKZVxEh23qB9KgPqFq3uoyBy3M93PcFOunrvjkYVrtfvXMworbBuWAZ4A/0?tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:auto;" alt="0?tp=webp&wxfrom=5&wx_lazy=1" />
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
650) this.width=650;" title="金屬質感分割線" src="https://mmbiz.qpic.cn/mmbiz/cZV2hRpuAPjEIibB1UYw1VMPzscNxReKZVxEh23qB9KgPqFq3uoyBy3M93PcFOunrvjkYVrtfvXMworbBuWAZ4A/0?tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:auto;" alt="0?tp=webp&wxfrom=5&wx_lazy=1" />
Windows Server 2008 R2 操作
開啟“控制台” → 點擊“角色” → 點擊“添加角色” → 點擊“下一步” → 點擊“檔案服務” → 點擊“下一步“ →點擊”下一布” → 選擇“網路檔案系統服務” → 點擊“下一步“ → 點擊”安裝“,如所示:
650) this.width=650;" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCBP6vrbj1Uuc6KxjZnx0gicnUPugjSI6NF1B2nbewg84gBwDOXTPrmCQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:auto;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
650) this.width=650;" title="" border="0" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCTUe3R05fQC2BovibyRw79ic1sYIntUBm7QIDdbxUt639IOjfhp4LdlbA/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:582px;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
650) this.width=650;" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCYo99UmCpZoiaVGEEvnJ8KPiaj4cMPlO7AoicyeWwLvGnkgVoMquic9NOag/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:auto;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
安裝完成後需要同時鍵入“Win + r”鍵開啟cmd
650) this.width=650;" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCXCLF8b4RNU3HsgmpiaPZEvwELXNC0OZ5ldGZiahwOTaicbezR6bfyEStg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:auto;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
# 註:192.168.190.128是nfs伺服器的地址,/nfs是伺服器的共用目錄,X是nfs在windows中的掛載點
輸入:mount 192.168.190.128:/nfs X:
650) this.width=650;" title="" border="0" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCDAEsNyQKy4ibaibiciatnHeLn1ZchNgdjWydVF9CwoXzlKyha7elOSZD1A/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:582px;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
開啟電腦探索已經掛載成功
650) this.width=650;" title="" border="0" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCgtsYa5KYAyYZkPyFIicicn1H18Y4JR6qyHJqnp0B1qX1rPYZJOF2lrMQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:582px;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
若要開機自動掛載可以點擊“電腦” → 點擊“映射網路磁碟機” → “輸入網際網路共用檔案路徑“ → ”完成“
650) this.width=650;" title="" border="0" src="https://mmbiz.qpic.cn/mmbiz_png/3zoYydJjr11hncL2ndIFoRZdphIb4lsCPEZFTp1cMFsXEc9SnwFqylwK3sST31MRHTSFWQXia8lQ6uv97AiaBqTw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1" style="margin:0px;padding:0px;height:auto;width:582px;" alt="640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=" />
重啟之後發現共用檔案Z依然是掛載狀態
本文出自 “小菜鳥” 部落格,請務必保留此出處http://baishuchao.blog.51cto.com/12918589/1929982
Windows掛載NFS檔案系統