美文网首页
CentOS部署nfs服务器

CentOS部署nfs服务器

作者: 卫彬TM | 来源:发表于2020-06-24 13:43 被阅读0次

服务器端配置

先下载需要rpm包分发到其他的服务器上
yum install -y nfs-utils --downloadonly --downloaddir=/opt/nfsrpm
或者yum install -y nfs-utils


image.png

vi /etc/exports
/data/nfs 10.67.40.121/24(rw,sync,fsid=0)


image.png

systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl start rpcbind.service
systemctl start nfs-server.service
rpcinfo -p
exportfs -r
exportfs


image.png

客户端配置

编写简单安装脚本

#!/bin/bash
yum install *.rpm -y
systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl start rpcbind.service
systemctl enable nfs-server.service
showmount -e 10.67.40.121
mkdir /data/nfsdata
mount -t nfs 10.67.40.121:/data/nfs /data/nfsdata

sshpass -p 密码 scp * 10.67.40.124:/data/nfsrpm
执行脚本

相关文章

网友评论

      本文标题:CentOS部署nfs服务器

      本文链接:https://www.haomeiwen.com/subject/fvminhtx.html