Share directory among linux and using SSH

来源:互联网 发布:淘宝保证金 编辑:程序博客网 时间:2024/06/16 00:35
Bean在调试Mozart时,桌子上摆满了网线,显示器还有主机。现场是混乱不堪。Bean不得以只留下一台显示器,一个键盘鼠标。
用一套IO去控制三台PC一个BOARD。

物理链接:
    a.用一个TP-link和网线连接三台PC和一个BOARD
    b.把TP-link的WAN口连接到外网。
    c.用串口连接Mozart与PCIE-PC
    d.通过PCIE接口链接Mozart与HOST-PC
系统链接:
    a.HOST-PC通过ssh登录PCIE-PC系统
    b.HOST-PC通过minicom与Mozart进行通信
    C.TEST-PC通过网络访问Mozart

CODEing:
    a.Mozart中运行的code在HOST-PC上交叉编译
    b.PCIE-PC负责编译测试Mozart作为PCIE-EP情形的驱动和数据传输
    c.Mozart作为运行Capture/Encode/Decode/Webserver/Resize等进行的平台
    d.TEST-PC作为Client,测试Mozart的Webserver以及Webcapture

FileSystem:
    a.Mozart通过网络挂载HOST-PC上的NFS文件系统:</path/to/mozart/NFS>
    b.PCIE-PC通过网络挂在HOST-PC上的NFS文件系统:</path/to/share/directory>
    c.TEST-PC通过samba与HOST-PC共享文件:<path/to/share/test/directory>

1.如何用NFS实现多PC的文件共享:
HOST-PC
    安装NFS
        sudo apt-get install nfs-server
    exports
        gedit /etc/exports
        //////////////////////////////////////////////

        /path/to/mozart/rootfs *(rw,sync,no_root_squash,no_subtree_check)
        /path/to/pcie-pc/share *(rw,sync,no_root_squash,no_subtree_check)
        /path/to/test-pc/share *(rw,sync,no_root_squash,no_subtree_check)
        ///////////////////////////////////////////////
    Restart
        /etc/init.d/nfs restart
Mozart
    enter uboot add the paramter of filesys=nfs i(需要先配置内核,使其只是NFS文件系统)
        ///////////////////////////////////////////////
       bootcmd=setenv bootargs ${bootargs} ${mtdparts};sf read 0xa000000x30000 0x1d0000;sf read 0x3000000 0x200000 0x800000;jump 0xa00000
        bootdelay=3
        baudrate=38400
        modelname=MOZART380
        ethaddr=F1:56:87:87:A1:89
        filesize=6BE000
        fileaddr=A00000
        gatewayip=192.168.1.1
        ipaddr=192.168.1.123
        serverip=192.168.1.121
        netmask=255.255.255.0
       bootargs=root=/dev/nfs rwnfsroot=<HOST-PC-IP>:<path/to/rootfs>ip=<mozart-ip>:<HOST-PC-IP>::255.255.255.0 console=2
        ///////////////////////////////////////////////       

PCIE-PC
    安装NFS
        sudo apt-get install nfs-client
    mount
        gedit /etc/fstab
          ///////////////////////////////////////////////
       # <file system>               <mount point>           <type>  <options>    <dump>     <pass>
        ---------------               **************           +++++++ @@@@@@  %%%%%%%%%% ~~~~~
        <HOST-PC-IP>:</path/to/pcie-pc/share> </mount/dir/pcie-pc>    nfs    auto,rw,user    0         0
          ///////////////////////////////////////////////

    reboot
        sudo reboot

2.如何用在windows和linux之间共享目录
TEST-PC    
    share
    新建一个目录,
    更改属性,
    去掉只读标记,
    勾选在网络上共享,
    勾选允许网络用户更改我的文件

HOST-PC
    安装samba
        sudo apt-get install samba
    浏览共享文件:
        smb://TEST-PCIP
原创粉丝点击