zoukankan      html  css  js  c++  java
  • Linux NFS

    nfs简介

    nfs 或者叫网络问卷系统 是一种分布式文件系统协议,使得你可以挂载远程的目录到你的服务器上。使得你可以在不同的地点管理存储空间 而且可以从多个客户端写入数据。NFS通过网络提供了一种相对便捷和简单的方式 去访问远程的系统 特别是在某些需要定期访问分享资源情况下
    
    构建一个简单的NFS系统 需要一个客户端 和  一个远程端
    

    安装

    Host

    apt-cache pkgnames | grep nfs
    apt-get install nfs-kernel-server
    

    Client

    apt-get install nfs-common
    

    查看进程

    ps -aux | grep -E '(nfs|rpc)'
    

    Host 配置服务

    设置共享目录 并添加读写权限

    编辑 /etc/exports
    添加 /home/guolin *(rw) 
    
    重启服务 
    /etc/init.d/rpcbind restart 
    /etc/init.d/nfs-kernel-server restart
    

    查看共享目录

    root@ubuntu:/home/guolin# showmount -e
    Export list for ubuntu:
    /home/guolin *
    

    Clien 配置服务

    扫描NFS服务 
    root@ubuntu:/var/nfs showmount -e 192.168.232.101
    Export list for 192.168.232.101:
    /home/guolin *
    
    挂载
    mkdir nfs
    mount -t nfs -o nolock 192.168.232.101:/home/guolin /mnt/nfs
    
    ##mount -t 指定文件类型
    

    设置开机自动挂载

    编辑 /etc/fstab文件
    192.168.232.101:/home/guolin /mnt/nfs nfs
  • 相关阅读:
    JDBC事务--软件开发三层架构--ThreadLocal
    SQL查询-约束-多表
    SQL基本语法总结
    DDL
    ZOJ 1178 Booklet Printing
    ZOJ 1107 FatMouse and Cheese
    ZOJ 1099 HTML
    ZOJ 1041 Transmitters
    ZOJ 1095 Humble Numbers
    ZOJ 1105 FatMouse’s Tour
  • 原文地址:https://www.cnblogs.com/alin-qu/p/8439018.html
Copyright © 2011-2022 走看看