天天看點

centos7之最基本的nfs檔案共享服務

#yum -y install rpcbind nfs-utils
vim /etc/exports 檔案内容為空 需要自己手寫 格式如下 /root/public 192.168.1.0/24(rw或者ro) 網段 /root/public 192.168.1.1/32(rw或者ro) IP位址 /root/public *.(rw或者ro) 全部位址
#mkdir /root/public
#systemctl restart nfs #systemctl restart rpcbind
#yum -y install nfs-utils  #showmount -e nfs伺服器IP
#mkdir /mnt/public #mount -o v3 192.168.1.2:/root/public /mnt/public -o v3
#vim /etc/fstab 在檔案的最下方添加下面内容 192.168.1.2:/root/public /mnt/public nfs defaults 0 0

然後你就可以在/mnt/public目錄下看到共享的檔案了

配置結束

本章獲得知識點:

centos7中nfs服務的配置

靖桐

12月17日

繼續閱讀