Ubuntu挂载网络文件系统NFS

1.sudo apt-get install nfs-kernel-server 安装nfs。

ubuntu下nfs安装配置

2.sudo mkdir /home/share/nfs 建立nfs共享文件夹。 执行 chmod 777 /home/share/nfs(以防出现权限问题)

ubuntu下nfs安装配置

3.sudo vi /etc/exports 配置nfs。

ubuntu下nfs安装配置

4.在文档的最后一行加入/home/song/nfs *(rw,sync,no_root_squash,no_subtree_check),保存退出。

ubuntu下nfs安装配置

5.sudo /etc/init.d/rpcbind restart 重启rpcbind

sudo /etc/init.d/nfs-kernel-server restart 重启nfs

ubuntu下nfs安装配置

ubuntu下nfs安装配置

6.测试

运行以下命令来显示一下共享出来的目录:

showmount -e​

6.mount -t nfs -o tcp,nolock  172.16.188.141: /home/song/nfs   /etc/rc.local 在目标机中挂载服务器的共享文件夹,把以上指令写到/etc/rc.local 当中可实现开机自动挂载

7.其他说明:

linux中mount命令参数详解(nfs 参数):

https://yq.aliyun.com/articles/10547

常见错误说明(包括经常掉线问题):

http://www.360doc.com/content/15/0305/13/14530056_452725944.shtml

linux里挂载(mount)和取消挂载(umount)命令的使用

http://blog.csdn.net/xiyangyang8/article/details/49725039

nfs挂载掉线问题汇总

http://blog.chinaunix.net/uid-30379893-id-5191663.html

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值