zoukankan      html  css  js  c++  java
  • Ubuntu 12.04安装NFS server

    首先安装nfs-kernel-server

    apt-get install nfs-kernel-server 

    然后创建一个目录:

    mkdir -p /opt/share 

    并赋予权限777:

    chmod -R 777 /opt/share

    在/etc/exports文件中添加配置:

    /opt/share 10.112.18.0/255.255.255.0(rw,no_root_squash) 

    在/etc/hosts.allow中添加配置:

    portmap:10.112.18.0/255.255.255.0 

    在/etc/hosts.deny中添加配置:

    portmap:ALL 

    重新启动两个服务:

    service portmap restart 

    service nfs-kernel-server restart

    在另一台Ubuntu上安装nfs-common

    apt-get install nfs-common 

    然后创建目录test

    mkdir ~/test 

    然后运行测试命令看一下:

    # showmount -e 10.112.18.158 

    Export list for 10.112.18.158: 

    /opt/share 10.112.18.0/255.255.255.0 

    找到nfs server的挂载目录了。现在手工挂载:

    mount -t nfs4 10.112.18.158:/opt/share ~/test/ 

    现在可以测试了,应该成功。

  • 相关阅读:
    单调栈模板
    Yet Another Broken Keyboard[双指针]
    经典递归集合
    [未完成]ECRound 80
    #614 C. NEKO's Maze Game[简易DFS,0|1转换]
    等差数列异或和模板
    线段树基础题
    前缀和&差分
    优先队列
    st表模板
  • 原文地址:https://www.cnblogs.com/lidabo/p/4380556.html
Copyright © 2011-2022 走看看