centos共享远程目录

admin6年前IT技术1259

服务器端设置:
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也可以

 

 

相关文章

汇成政府建站CMS系统V1.5

汇成政府建站CMS系统V1.5官方下载地址:˂a target="_blank" href="download/zfhuichengv15.rar"˃点击下载演示地址:ceshi/zhengfucms...

phptool phpfmt这两个插件会导致sublime出问题

 phptool 会让sublime产生垃圾文件phpfmt会导致sublime出死机,但是他能修正错误的PHP写法,要区别对待他,但是一个文件页面代码多了,他会导致sublime死机...

yt-dlp+ffmpeg

1. 安装Python和ffmpegPython:安装时把pip和添加系统环境变量都选上ffmpeg:下载好exe文件,把目录添加到系统环境变量就行2. 安装yt-dlppip install yt-...

excel参照另一列筛选数据的函数

=IF(ISERROR(VLOOKUP(D7,F:F,1,0)),D7,1) ISERROR防止报错 ...

mount:is write-protected, mounting read-only解决方案

window10升级之后就遇到mount: **** is write-protected, mounting read-onlymount: cannot mount *** read-only尝试...

excel打开csv 出现乱码怎么解决

1使用记事本打开CSV文件2点击菜单:文件-另存为,编码方式选择ANSI3保存完毕后,再用EXCEL打开这个文件就不会出现乱码的情况...

发表评论    

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