centOS安裝配置NFS


環境

nfs 192.168.56.101

client 192.168.56.102

一、yum 安裝

yum -y install nfs-utils rpcbind

 

192.168.56.101:

nfs 的配置文件 /etc/expots

默認為空

vi /etc/exports

/opt/test/ 192.168.56.0/24(rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501)

systemctl enable rpcbind.service
systemctl enable nfs-server.service

systemctl restart rpcbind
systemctl restart nfs

 

192.168.56.102:

 

showmount -e 192.168.56.101 # IP需要是搭建nas的IP
mkdir /opt/test
mount -t nfs 192.168.56.101:/opt/test /opt/test

 

設置開機自動掛載

vi /etc/fstab

添加:    192.168.56.101:/opt/test /opt/test nfs  defaults 0 0


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM