nfs配置

Posted languang9801

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nfs配置相关的知识,希望对你有一定的参考价值。

1:服务器端:

[[email protected] ~]# mkdir /nfsfile
[[email protected] ~]# chmod 777 /nfsfile/
[[email protected] ~]# echo "welcome to nfs" > /nfsfile/readme.txt

[[email protected] ~]# vim /etc/nfs.conf(加上以下内容)

  /nfsfile 192.168.0.*(rw,sync,root_squash)


[[email protected] ~]# firewall-cmd --permanent --add-service=nfs
success
[[email protected] ~]# firewall-cmd --permanent --add-service=mountd
success
[[email protected] ~]# firewall-cmd --permanent --add-service=rpc-bind
success
[[email protected] ~]# systemctl restart firewalld.service

[[email protected] ~]# systemctl restart rpcbind.socket
[[email protected] ~]# systemctl enable rpcbind.socket
[[email protected] ~]# systemctl restart nfs-server
[[email protected] ~]# systemctl enable nfs-server
完成!

2:客户端

[[email protected] ~]# showmount -e 192.168.0.66

Export list for 192.168.0.66:

 

以上是关于nfs配置的主要内容,如果未能解决你的问题,请参考以下文章

五十NFS介绍NFS服务端安装配置NFS配置选项

NFS介绍,NFS服务端安装配置,NFS配置选项

53次课( NFS介绍 NFS服务端安装配置NFS配置选项)

NFS介绍NFS服务端安装配置NFS配置选项

NFS介绍,NFS服务端安装配置,NFS配置选项

14.1 NFS介绍 14.2 NFS服务端安装配置 14.3 NFS配置选项