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,开机就会自动挂载了

  • 相关阅读:
    hibernate hql
    数据库锁机制
    Spring 事物管理
    spring自动代理
    spring 其它增强类型
    spring
    mybatis动态sql
    SSH注解整合
    ssh整合
    错题解析
  • 原文地址:https://www.cnblogs.com/puloieswind/p/5853401.html
Copyright © 2011-2022 走看看