zoukankan      html  css  js  c++  java
  • EasyARM-iMX283 安装NFS

    1. 安装NFS软件包
    ubuntu 上请输入下面命令:
    [chenxibing@localhost ~]$ sudo apt-get install nfs-kernel-server
    [chenxibing@localhost ~]$ sudo apt-get install nfs-common
    2. 添加NFS目录
    修改
    /etc/exports 文件,在其中增加 NFS 目录(需要 root 权限,请使用 sudo 命令)并指
    产品用户手册
    ©2013 Guangzhou ZLG MCU Technology Co., Ltd.
    2
    广州周立功单片机科技有限公司

    EasyARM-iMX283 开发平台


    Linux 开发指南
    定访问主机的 IP 以及访问权限。
    [chenxibing@localhost ~]$ sudo vi /etc/exports
    [sudo] password for chenxibing:
    如增加/home/proton/EasyARM-iMX283 目录,并允许 IP 192.168.1.*的任何系统进行
    NFS 访问,增加内容如下:
    /home/proton/EasyARM-iMX283 192.168.1.*(rw,sync,no_root_squash)
    3. 启动NFS服务
    同样需要
    root 权限, 执行 sudo /etc/init.d/nfs-kernel-server start 或者 restart 命令,可以启
    动或者重新启动
    NFS 服务:
    [chenxibing@localhost ~]$ sudo /etc/init.d/nfs-kernel-server start
    [sudo] password for chenxibing:
    *Exporting directories for NFS kernel daemon... [ OK ]
    * Starting NFS kernel daemon [ OK ]
    NFS 服务已经启动的情况下,如果修改了/etc/exports 文件,可以重启 NFS 服务,刷
    NFS 共享目录。
    4. 测试NFS服务器
    首先可以在主机上进行自测,将已经设定好的
    NFS 共享目录 mount 到另外一个目录下,
    看 能 否 成 功 。 假 定 主 机
    IP 192.168.1.138 NFS 共 享 目 录 为
    /home/proton/EasyARM-iMX283 ,可使用如下命令进行测试:
    # mount -t nfs 192.168.1.138: /home/proton/EasyARM-iMX283 /mnt –o nolock
    如 果 指 令 运 行 没 有 出 错 , 则 NFS 挂 载 成 功 , 在 /mnt 目 录 下 应 该 可 以 看 到
    /home/proton/EasyARM-iMX283 目录下的内容。
    启动评估套板并进入
    Linux。将目标板接入局域网或者通过交叉网线与主机直连,设定
    目标板的
    IP,使之与主机在同一网段,然后进行远程 mount 操作。
    [root@zlg /]# ifconfig eth0 192.168.1.136
    [root@zlg /]# ping 192.168.1.138
    [root@zlg /]# mount -t nfs 192.168.1.138: /home/proton/EasyARM-iMX283 /mnt -o nolock
    在进行远程挂载之前,最好先用 ping 命令检查网络通信是否正常,只有在能 ping 通的
    情况下,才能进行正常挂载,否则请检查网络。如果在已经
    ping 通的情况下,远程挂载出
    现错误,请检查主机和目标机的其它设置。
     

    试验:

    需对被共享目录设置相应权限

    /etc/exports文件中建立共享目录,制定相应网段无效,后改为所有网段后挂载成功

    ×

  • 相关阅读:
    WPF之感触
    C# WinForm 给DataTable中指定位置添加列
    MyEclipse 8.6 download 官方下载地址
    将博客搬至CSDN
    Building Microservices with Spring Cloud
    Building Microservices with Spring Cloud
    Building Microservices with Spring Cloud
    Building Microservices with Spring Cloud
    Building Microservices with Spring Cloud
    Building Microservices with Spring Cloud
  • 原文地址:https://www.cnblogs.com/wjchao/p/7384416.html
Copyright © 2011-2022 走看看