cnetos7 64位系統 nfs服務安裝與配置

cetnos7下部分命令已變,例如ifconfig變更爲ip addr


使用yum安裝nfs

yum -y install nfs-unitls rpcbind

修改配置文檔/etc/exports

初開始文檔裏沒有任何內容,可以自行添加:

/opt/test/ 192.168.1.0/24(rw,no_root_squash,no_all_squash,sync)

使配置生效

exportfs -r

查看是否安裝了nfs

rpm -qa | grep nfs rpcbind

啓動nfs

service rpcbind start或者使用/bin/systemctl start rpcbind.service

service nfs start或者使用/bin/systemctl start nfs.service

chkconfig rpcbind on或者使用systemctl enable rpcbind.service

chkconfig nfs on或者使用systemctl enable nfs.service


查看掛載

showmount -e

客戶端掛載

mount -t nfs 192.168.1.*:/opt/test /mnt



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章