差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:nfs [2013/05/30 01:27] jonathantech:nfs [2024/02/01 11:56] (目前版本) – [安裝語法] jonathan
行 3: 行 3:
   * NFS Clien : 192.168.11.232(vm-web)   * NFS Clien : 192.168.11.232(vm-web)
  
-<code sh>+===== 安裝語法 ===== 
 +  * CentOS<cli>
 yum install nfs-utils nfs-utils-lib yum install nfs-utils nfs-utils-lib
-</code>+</cli> 
 +  * Ubuntu<cli> 
 +sudo apt install nfs-common nfs-kernel-server 
 +</cli> 
 +  * Alpine<cli> 
 +sudo apk add nfs-utils 
 +</cli>
  
-===== NFS Server 端 =====+==== NFS Server 端 ====
 <code> <code>
 vi /etc/hosts vi /etc/hosts
行 22: 行 29:
 /data/ vm-web(rw,no_root_squash,no_all_squash,sync) /data/ vm-web(rw,no_root_squash,no_all_squash,sync)
 </file> </file>
-<code+  * CentOS <cli
-service nfs start +systemctl start nfs 
-</code>+</cli> 
 +  * Ubuntu <cli> 
 +systemctl start nfs-server.service 
 +</cli>
 <note warning> <note warning>
   * /etc/exports 內的設定的 nfs client 的 hostname 必須要正確, 否則當 clinet 要 mount 時會出現如下訊息: <code>   * /etc/exports 內的設定的 nfs client 的 hostname 必須要正確, 否則當 clinet 要 mount 時會出現如下訊息: <code>
行 30: 行 40:
 </code> </code>
  
-  * 每次更動 /etc/exports 之後, 必須要重新啟動 nfs 服務 <code+  * 每次更動 /etc/exports 之後, 必須要重新啟動 nfs 服務 
-service nfs restart +    * CentOS <cli
-</code>+systemctl start nfs 
 +</cli> 
 +    * Ubuntu <cli> 
 +systemctl start nfs-server.service 
 +</cli> 
 +</note> 
 + 
 +<note important> 
 +  * 如果想要簡單的設定權限, 讓所有連入 NFS 的使用者都是使用 root 權限可以在 export 的定義內加上 ,anonuid=0,anongid=0 \\ Exp. <file> 
 +
 +/STORAGE 10.0.5.10(rw,sync,no_subtree_check,all_squash,anonuid=0,anongid=0) 
 +</file> 
 +  * OpenMediaVault 可以這樣設定 \\ {{:tech:2023-02-07_162019.png?600|}}
 </note> </note>
  
行 124: 行 146:
   * http://www.sofee.cn/blog/2006/09/29/46/   * http://www.sofee.cn/blog/2006/09/29/46/
   * http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-client-config-options.html   * http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-client-config-options.html
 +  * https://serverfault.com/questions/539267/nfs-share-with-root-for-anonuid-anongid
  
 {{tag>linux nfs 網路磁碟 儲存}} {{tag>linux nfs 網路磁碟 儲存}}
  • tech/nfs.1369848422.txt.gz
  • 上一次變更: 2013/05/30 01:27
  • jonathan