首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

两台 linux 机器其间mount

2012-07-16 
两台 linux 机器之间mount比如我有两台 linux 机器,192.168.1.1192.168.1.2现在我要将 192.168.1.1 下的/o

两台 linux 机器之间mount
比如我有两台 linux 机器,192.168.1.1  192.168.1.2
现在我要将 192.168.1.1 下的/opt/mydir 目录挂在到 192.168.1.2 /opt/mydir1 目录下。
需要以下操作:
1.服务器端 192.168.1.1
  在/etc/exports 目下添加共享目录
  /opt/mydir 192.168.1.2(rw)
/opt/mydir   hostname(rw)
hostname  是指192.168.1.2 的hostname, 需要在/etc/hosts 中添加 hosts

2.启动192.168.1.1 的nfs 服务
         /etc/rc.d/init.d/portmap start (在REDHAT中PORTMAP是默认启动的)
   /etc/rc.d/init.d/nfs start 启动NFS服务
   /etc/rc.d/init.d/nfs stop 停止NFS服务


3.在192.168.1.2 上mount 目录
#mount -t nfs -o rw 192.168.1.1:/opt/mydir /opt/mydir1

热点排行
Bad Request.