centos共享远程目录

admin6年前IT技术1317

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

 

 

相关文章

为CMD设置代理

set http_proxy=http://127.0.0.1:10809set https_proxy=http://127.0.0.1:10809永久设置方案先设置好IE代理,cmd执行如下命令:...

Xray VLESS / TLS

Xray VLESS / TLS

 Amazon Linux 2 上顺利运行的 Xray 一键安装脚本,包含:Xray VLESS / TLS(443 或 8443,建议用 8443)systemd 自动启动BBR + 内核...

掌握了excel宏开发,开心一下

步骤1.保存为支持宏命令的excel格式2.先录制,3.把重复的操作用for to next的语句段写出来案例如下:Sub Macro5() For i = 9 To 10073  ...

[转]想学流量,有哪些值得推荐的【优质】渠道?

[转]想学流量,有哪些值得推荐的【优质】渠道?

在当今的互联网中,流量的成本越来越贵,获取客户的价格也越来越高,所有做互联网生意的人,都要时刻思考的两点是:第一:我的客户,我的产品曝光要从哪里来?第二:如何以最低的成本,获取有效的客户?当所有人的流...

发表评论    

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