zoukankan      html  css  js  c++  java
  • linux共享文件夹

    服务器1:192.168.1.1
    服务器2:192.168.1.2  

    192.168.1.1

    ssh root@192.168.1.1   password  123456  

    关闭防火墙

    service iptables stop

    $yum -y install nfs
    $vi /etc/exports
    --编辑 此内网网段对/home/share均可读写
    /home/share 192.168.1.*/24(rw,sync) -- rw代表 读写   可以用 *(rw,sync)代表任何客户端都可以访问
    ----保存
    $chmod -R 775 /home   --权限
    $service rpcbind start  --不知道干啥的
    $service nfs start  --开启nfs服务
    $chkconfig nfs on  --不知道干啥的
    $chkconfig rpcbind on --不知道干啥的

    192.168.1.2

    $yum -y install nfs

    $service rpcbind start  --不知道干啥的

    $service nfs start  --开启nfs服务
    $chkconfig nfs on  --不知道干啥的
    $chkconfig rpcbind on --不知道干啥的

    $mkdir /home/share

    $mount 0t nfs 192.168.1.1:/home/share /home/share   --ip一定要是上边开启服务的   :不能缺少  前边的/home/share  是exports里配置的路径   后边的/home/share 是当前的自己新建的文件夹。挂载成功之后,.1服务器上操作了文件夹,.2上就会出现操作的内容了。

    $df -h

  • 相关阅读:
    判断是否为蜘蛛抓取
    js Date
    JavaScript_Date对象说明
    php过滤字符串函数
    js 高考倒计时
    php 修改数据编码
    php 二维数组冒泡排序
    PSD网页切图制作HTML全过程教程
    产品经理职责
    互联网产品设计
  • 原文地址:https://www.cnblogs.com/liangbo-/p/10831698.html
Copyright © 2011-2022 走看看