zoukankan      html  css  js  c++  java
  • linux 使用nfs 服务实现远程共享

    首先安装

    apt install -y nfs-kernel-server nfs-common

    编辑配置文件

    vim /etc/exports

    添加内容:

    /root/test *(rw,sync,no_root_squash)

    参数含义:

    首先是目录,然后星号表示任何ip都能访问

    rw:读写,如果想要只读,可设为"o"
    sync:数据同步写入硬盘
    no_root_squash:当远程访问使用root用户时,不映射成匿名用户,如果想用映射,可设为"root_squash"
    no_subtree_check:这个表示不确认父目录的权限,上面没设置这个

    启动服务

    /etc/init.d/nfs-kernel-server start

    每次修改过配置文件得重启下:

    /etc/init.d/nfs-kernel-server restart

    查看共享出去的目录

    showmount --exports

    远程访问挂载

    先安装nfs客户端(看本文最上面),建立/nfs目录,然后执行:

    mount -t nfs 10.22.35.1:/root/test /nfs/

    Windows 安装NFS与挂载目录

    控制面板 - 程序和功能 - 打开或关闭 Windows 功能 - NFS 服务 - NFS 客户端

    在控制台输入以下命令挂载:

    mount 10.22.35.1:/root/test n:


  • 相关阅读:
    spring boot 集成 kaptcha
    3.1 表格类数据
    3.0 本章介绍
    2.9 tensor API简介
    2.8 将tensor移动到GPU上
    2.7 序列化(保存)tensor
    2.6 与numpy交互
    2020-7-22 头条 JAVA 后端面试
    API 设计最佳实践的思考
    ESXi 安装网卡vib驱动文件
  • 原文地址:https://www.cnblogs.com/dhName/p/11229906.html
Copyright © 2011-2022 走看看