zoukankan      html  css  js  c++  java
  • (转)Ubuntu12.04上NFS Server安装使用过程

    原文链接:Ubuntu12.04上NFS Server安装使用过程

    实现步骤:

    1.服务器端:sudo apt-get install portmap
    2.服务器端:sudo apt-get install nfs-kernel-server
    3.客户端:sudo apt-get install nfs-common
    4.服务器端配置:sudo gedit /etc/exports

    添加:/home/share 192.168.1.*(rw,sync,no_root_squash)
      (共享目录)         (允许IP)   
    (rw权限是可擦写,还有ro只读,sync代表数据会同步写入到内存与硬盘中,async则代表数据会先暂存于内存当中,而非直接写入硬盘,开放客户端使用root身份来操作服务器的文件系统,那么开no_root_squash才行,root_squash不允许)
    5.服务器端启动:sudo /etc/init.d/portmap restart
    6.服务器端启动:sudo /etc/init.d/nfs-kernel-server restart
    7.arm板连接时:

    主机:sudo ifconfig eth0 192.168.1.101 netmask 255.255.255.0
        arm板:ifconfig eth0 192.168.1.102 netmask 255.255.255.0
    8.arm板上mount:mount -t nfs 192.168.1.101:/home/share /mnt/hosts
           (主机IP和共享目录)         (arm板目录)
    mount上之后arm板上文件自动同步

    1.出现问题:
        reason given by server: Permission denied

    解决:服务器端启动一定要sudo启动,不然启动失败,服务拒绝

    2.出现问题:
    svc: failed to register lockdv1 RPC service (errno 111). 
    lockd_up: makesock failed, error=-111 
    mount: mounting 192.168.1.101:/home/share on /mnt/hosts failed: Connection refused
    则改成:
    mount -t nfs -o nolock 192.168.1.101:/home/share /mnt/hosts
    3.出现问题:
    mount: mounting 192.168.1.101:/home/share on /mnt/hosts failed: Device or resource busy
    解决:
    mount上之后在进行mount命令会出现此提示,设备正在运行,不用再次mount
    如果想再次mount可以先umount /mnt/hosts
    )

  • 相关阅读:
    ts 与 C#的 一个差异的地方
    .net core的 几个模板比较
    iOS 绘画学习(3)
    在你的iPad上调整图片尺寸
    Pholio应用开发指南:通过平铺组成大的图片
    学会爱上iOS自动布局(Auto Layout)
    iOS 绘画学习(2)
    iOS 绘画学习(1)
    iOS 证书管理、验证、打包流程
    UIScrollView 技巧(2)
  • 原文地址:https://www.cnblogs.com/lihaiping/p/5101194.html
Copyright © 2011-2022 走看看