我可以不吃啊 发表于 2024-11-23 16:48:45

nfs服务器

1、nfs配置
安装


[*]#  yum install rpcbind
[*]# yum install nfs-utils
服务端(192.168.217.129)


[*]# mkdir /data
[*]# vi /etc/exports
[*]# cat /etc/exports
 /data 192.168.217.130(rw)
[*]# chmod o+w /data/
[*]#  systemctl disable firewalld --now
[*]# getenforce
Enforcing
[*]# setenforce 0
[*]# systemctl restart nfs-server
[*]# showmount -e 192.168.217.129
Export list for 192.168.217.129:
/data 192.168.217.130
客户端(192.168.217.130)


[*]# showmount -e 192.168.217.129
Export list for 192.168.217.129:
/data 192.168.217.130
[*]# mkdir -p /nfsclient/client-data/
[*]# mount 192.168.217.129:/data /nfsclient/client-data/
[*]# df -h
https://i-blog.csdnimg.cn/direct/fa580198ea2548a0aa4f79b8cb3570b6.png
2、配置autofs自动挂载
客户端(192.168.217.130)


[*]# yum install autofs -y
[*]# vim /etc/auto.master
[*]# vim /etc/auto.wqq
[*]# grep wqq /etc/auto.master
/nfsclient /etc/auto.wqq
[*]# cat /etc/auto.wqq
wqq 192.168.217.129:/data
[*]#  systemctl restart autofs
[*]# cd /nfsclient/wqq
[*]# 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: nfs服务器