liangbo-

服务器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

 

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-06-20
  • 2021-05-04
  • 2021-12-28
猜你喜欢
  • 2021-05-31
  • 2021-08-08
  • 2021-10-29
  • 2021-11-30
  • 2021-12-28
  • 2021-12-18
相关资源
相似解决方案