zoukankan      html  css  js  c++  java
  • 如何利用mount命令挂载另一台服务器上的目录

    文件服务器(被挂载机):192.168.1.100

    操作机(挂载到机):192.168.1.200

    也就是说,你在操作机上进行的操作,实际上都到文件服务器上去了;

    1. 开启NFS服务:

    在文件服务器(被挂载机)上

    # chkconfig --level 35 nfs on  //开启NFS开机运行
    
    # service nfs start  //手动启动服务

    2. 编辑/etc/exports文件:

    加入:

    /tmp 192.168.1.100 (rw,sync,no_root_squash)  //编辑需要共享的目录和允许访问的服务器及权限。
      或
    /opt/apache-tomcat-6.0.37/webapps/fileShare/file * (rw,sync,no_root_squash)
    /mnt * (ro,sync)

    3. 在被搭载机上新建目录,配置权限:

    在操作机(挂载到机)上

    # mkdir /tmp
    # chmod 777 -R /tmp

    4. 建立连接:

    在操作机(挂载到机)上

    mount 192.168.1.100:/tmp /tmp

    5. 开机自动挂载:

    将这行

    mount 192.168.1.100:/tmp /tmp

    添加到/etc/rc.local,开机就会自动挂载了

  • 相关阅读:
    第一篇正式文章 随便聊聊吧
    CSS 28 块之间的空格
    CSS 27 贴在下方
    CSS 26 左右固定
    CSS 25 垂直居中
    CSS 24 左侧固定
    CSS 23 水平居中
    CSS 22 显示方式
    CSS 21 浮动
    CSS 20 相对定位
  • 原文地址:https://www.cnblogs.com/puloieswind/p/5853401.html
Copyright © 2011-2022 走看看