zoukankan      html  css  js  c++  java
  • NFS 共享存储与LVS

    NFS 共享存储与LVS

    NFS发布共享资源
    NFS的实现依赖于RPC (远程过程调用)机制,以完成远程到本地的映射过程,
    需要安装nfs-utils rpcbind 软件包提供NFS共享服务,前者用于NFS共享发布和访问,
    后者用于RPC支持。
    启动服务时先启动rpcbind 再启动nfs
    =====实验===
    3台机器
    主机1,主机2 为web节点,主机3为NFS服务器
    ===
    所有服务器关闭安全机制防火墙
    所有服务器安装 nfs-utils rpcbind
    所有服务都设置为开机自启动
    systemctl enable rpcbind
    systemctl enable nfs
    =====
    主机3 NFS 66   (nfs的配置文件/etc/exports ,默认是是空文件)
    vim /etc/exports
    /opt/wwwroot 192.168.200.0/24(rw,sync,no_root_squash)
    保存退出   ///opt/wwwroot  表示共享目录  no_root_squash 表示当客户机以root身份访问时赋予本地root权限。
    ////默认是root_squash 表示将作为nfsnobody用户降权对待
    mkdir /opt/wwwroot
    systemctl restart rpcbind
    systemctl restart nfs
    showmount -e   //查看共享
    echo "11111111111" > /opt/wwwroot /index.html
    ===================
    主机1 67
    showmount -e  192.168.200.66
    systemctl start rpcbind
    systemctl start nfs
    mount 191.168.200.66:/opt/wwwroot  /var/www/html/
    mount | tail -1   //查看挂载   等同于 tail -1 /etc/mtab  
    cat  /var/www/html/index.html   //测试
    设置自动挂载
    192.168.200.66:/opt/wwwroot   /war/www/html nfs defaults,_netdev 0 0
    主机2 68
    showmount -e  192.168.200.66
    systemctl start rpcbind
    systemctl start nfs
    mount 191.168.200.66:/opt/wwwroot  /var/www/html/
    mount | tail -1   //查看挂载   等同于 tail -1 /etc/mtab  
    cat  /var/www/html/index.html
    设置自动挂载
    192.168.200.66:/opt/wwwroot   /war/www/html nfs defaults,_netdev 0 0
    ===========================
    在浏览器中 输入调度器的IP 进行查看 192.168.200.254
    在主机4 调度器中ipvsadm -Ln 查看
     ========完成==========
  • 相关阅读:
    POJ 2187 Beauty Contest(凸包+旋转卡壳)
    POJ 3845 Fractal(计算几何の旋转缩放)
    POJ 1755 Triathlon(线性规划の半平面交)
    POJ 2540 Hotter Colder(半平面交)
    POJ 3525/UVA 1396 Most Distant Point from the Sea(二分+半平面交)
    POJ 3348 Cows(凸包+多边形面积)
    POJ 1228 Grandpa's Estate(凸包唯一性判断)
    POJ 2826 An Easy Problem?!(线段交点+简单计算)
    如何在ARC代码中混编非ARC代码
    给view 添加事件
  • 原文地址:https://www.cnblogs.com/elin989898/p/11941663.html
Copyright © 2011-2022 走看看