Linux系统NFS搭建

linux虚拟机作为NFS客户端:

1.sudo yum install nfs-utils     或 sudo apt install nfs-common

如果apt install nfs-common报错dpkg: error processing package rpcbind (--configure)      

     删除所有信息之后update

sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/

sudo mkdir /var/lib/dpkg/info/

sudo apt-get update

  再apt install nfs-common成功

2.在客户端/home/uxdb/建挂载目录nfs

3.挂载 sudo unmount -t nfs -o nfsvers=3 192.30.0.134:/g/nfs /home/uxdb/nfs    

解挂载   sudo umount /home/uxdb/nfs

sudo mount -t nfs  192.30.0.150:/home/uxdb/CI_AutoTest/share /home/uxdb/CI_AutoTest/share

4.检查showmount -e 192.30.0.134

设置自动挂载NFS直接在配置文件 /etc/fstab里设置

[root@gaosh-17 ~]# grep '192.168.1.64' /etc/fstab

192.30.0.150:/home/uxdb/CI_AutoTest/share /home/uxdb/CI_AutoTest/share          nfs     defaults        0 0

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值