您的位置:首页 > 运维架构 > Linux

centos7 nfs服务器配置

2015-10-10 15:22 609 查看

一、yum 安装

yum -y install nfs-utils rpcbind

nfs 的配置文件 /etc/expots

默认为空

vi /etc/exports

/要挂载的目录 你的ip地址/24(rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501)

二、使配置生效

exportfs -r

三、启动 nfs

service rpcbind start

service nfs start

chkconfig rpcbind on

chkconfig nfs on

四、客户端挂载:

#查看可挂载

showmount -e (其他主机填对应ip)          

客户端挂载

 mount -t nfs -o nolock -o tcp xx.xx.xx.xx:/your-nfs-path /mnt

无提示 既为成功

注意:客户端挂载的时候可能由于防火墙的原因挂载不成功,一种解决方法,关闭防火墙:

systemctl stop iptables.service 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: