標籤(空格分隔):
下面詳細講一下nfs怎麼配置
1.介紹如下基本的環境,請對號入座vim
2.server端的配置centos
2.1下載安裝rpcbind、nfscentos7
sudo yum install rpcbind nfs-utils nfs-utils-librest
2.2設置開機自啓rpc、nfs服務
sudo systemctl enable rpcbind
sudo systemctl enable nfs-server
sudo systemctl enable nfs-lock
sudo systemctl enable nfs-idmap
2.3開啓rpc、nfs服務(注意要先開啓rpc服務)
sudo systemctl start rpcbind
sudo systemctl start nfs-server
sudo systemctl start nfs-lock
sudo systemctl start nfs-idmap
2.4建立shared directory
mkdir /mirror
2.5設置 /etc/exports
sudo vim /etc/exports
添加下面這些行:
/mirror *(rw,sync)
#上面的*表明全部的host均可以訪問。而且具備rw權限(更加詳細的配置能夠查看鳥哥的書
2.6重啓nfs服務
sudo systemctl restart nfd-serverserver
3.client端的配置
3.1下載安裝rpcbind、nfs
sudo yum install rpcbind nfs-utils nfs-utils-lib
3.2設置開機自啓rpc、nfs服務
sudo systemctl enable rpcbind
sudo systemctl enable nfs-server
sudo systemctl enable nfs-lock
sudo systemctl enable nfs-idmap
3.3開啓rpc、nfs服務(注意要先開啓rpc服務)
sudo systemctl start rpcbind
sudo systemctl start nfs-server
sudo systemctl start nfs-lock
sudo systemctl start nfs-idmap
3.4建立一個掛載shared directory的directory
sudo mkdir /mirror
3.5查看可掛載的目錄
showmount -e 10.0.0.6
#其中的10.0.0.6爲nfs的server端ipip