centos共享远程目录

admin5年前IT技术1151

服务器端设置:
1.安装依赖包 yum -y install nfs*
2.修改文件vim /etc/exports   添加如下内容
    /要共享的目录路径   客户端ip/24(rw,no_root_squash,sync,no_wdelay)
3.启动nfs,rpcbind,并设为开机自启
(centos7)
systemctl start nfs
systemctl start rpcbind
systemctl enable nfs
systemctl enable rpcbind
4.查看是否共享成功
showmount -e localhost
5.关闭防火墙
systemctl stop firewalld
systemctl disable firewalld.service
客户端设置:
 1.安装依赖包 yum -y install nfs*  
2.启动nfs (centos7)
systemctl start nfs
systemctl start rpcbind
systemctl enable nfs
systemctl enable rpcbind
3.检测服务器 showmount -e 服务器IP
4.网络挂载  这一步可以不操作
mount -t nfs -o nolock 服务端IP:共享目录绝对路径 本地挂载目录
5.开机自动挂载
vi /etc/fstab # 新增一行 服务端IP:/服务器目录/      /本地目录 nfs4 defaults 0 0
centos7的nfs默认使用的是nfs4,所以mount -t 无需指定nfs4也可以

 

 

相关文章

google关键词规划师的使用方法

第一步:设置国家第二步:设置语言第三部:设置上一步的同语系的关键词 如果没有第一步与第二步  会导致没有关键词提示!!!!...

Windows10家庭版添加Hyper-V的详细步骤

Windows10家庭版添加Hyper-V的详细步骤

转http://www.xitongcheng.com/jiaocheng/win10_article_60078.htmlHyper-V是微软提出的一种系统管理程序虚拟化技术,可以降低运作成本、提高...

删除系统还原点,可以释放大量c盘空间

删除系统还原点,可以释放大量c盘空间

删除系统还原点,可以释放大量c盘空间...

服务器2012打开远程端口,Windows Server 2012远程默认端口3389的修改

服务器2012打开远程端口,Windows Server 2012远程默认端口3389的修改

Window Server2012 修改远程桌面端口号Win + R 输入 regedit 打开注册表编辑器1、修改注册表项1HKEY_LOCAL_MACHINE/System/CurrentCont...

windows下安装、卸载mysql服务

windows下安装、卸载mysql服务2012年03月09日 16:30:20阅读数:52062 将下载下来的mysql解压到指定目录下(如:d:\mysql)安装服务 在命令行输入d:\...

L2TP端口

1701,1702,4500,500...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。