zoukankan      html  css  js  c++  java
  • NFS实现多服务器文件共享

    服务器

    1、安装所需的软件包

    yum install -y rpc-bind nfs-utils

    2、设为开机自启动

    systemctl enable nfs

    systemctl enable rpcbind

    3、启动

    systemctl start nfs

    systemctl enable rpcbind

    4、验证是否成功

    systemctl status nfs

     nfs-server.service - NFS server and services
       Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
       Active: active (exited) since Thu 2018-08-23 18:02:40 CST; 32min ago

    5、配置共享目录

    vi /etc/exports

    /home/ych/uploadFile  *  (rw,sync)

    chmod 766 /home/ych/uploadFile   ---更改文件夹权限

    客户端

    同服务端1~4步相同,启动nfs

    1、挂载目录

    mount 服务器IP:/home/ych/uploadFile     /home/ych/uploadFile

    客户端执行:df -h  可以查看已经挂载的目录信息

    开机自动挂载:

    在客户端/etc/fstab里添加

    服务器IP:/home/ych/uploadFile     /home/ych/uploadFile   nfs  defaults,_nodev 0 0 

    备注:第1个1表示备份文件系统,第2个1表示从/分区的顺序开始fsck磁盘检测,0表示不检测。

  • 相关阅读:
    1363:小球(drop)
    ifstream ofstream c++中读写文件
    线性筛
    Network of Schools POJ
    Beautiful numbers CodeForces
    ipone6界面设计标准
    目前的前端框架有哪些
    什么是react native
    nth-child() 选择器
    html{height:100%}的意义以及body背景色的解析推断
  • 原文地址:https://www.cnblogs.com/wanfeng/p/9525545.html
Copyright © 2011-2022 走看看