配置RHCS集群web (无共享存储)
power by yuhongxiang EMAIL:hongxiang22355@gmail.com
环境简介:如下表所示
主机名 | IP地址 | 虚拟ip | 作用 | OS版本 | 虚拟机软件 |
rhcs1.hongxiang.com | 192.168.26.21 | 192.168.26.23 | web1+luci | redhat enterprise 5.9 | vmware workstation 9 |
rhcs2.hongxiang.com | 192.168.26.22 | web2 | redhat enterprise 5.9 |
各个虚拟机网卡设置(仅与主机连接)
库配置
创建 /etc/yum.repo.d/base.repo
内容如下
[base]
name=base
baseurl=file:///media/Server
enabled=1
gpgcheck=0
[base1]
name=base1
baseurl=file:///media/VT/
enabled=1
gpgcheck=0
[base2]
name=base2
baseurl=file:///media/Cluster/
enabled=1
gpgcheck=0
[base3]
name=base3
baseurl=file:///media/ClusterStorage/
enabled=1
gpgcheck=0
挂载ISO镜像到/media即可
文件编辑
编辑/etc/hosts内容如下
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.26.21 rhcs1.hongxiang.com rhcs1
192.168.26.22 rhcs2.hongxiang.com rhcs2
防火墙
service iptables stop
chkconfig iptables off
setenforce 0
目测影响不适合很大
服务器搭建
yum install httpd
在rhcs1节点上的/var/www/html目录,新建index.html,内容如下:
<html>
<body>
this is RHCS1
</body>
</html>
在rhcs2节点上的/var/www/html目录,新建index.html,内容如下:
<html>
<body>
this is RHCS2
</body>
</html>
节点安装luci
yum –y install luci*
初始化以及重启
设置luci密码
luci_admin init
设置密码
安装RHCS软件
yum –y install cman
yum –y install ricci
yum –y install rgmanager
安装完所有RHCS组件后,重启所有节点,并启动ricci,luci服务,rhcs1节点需要启动luci,rhcs2不需要,服务启动完毕后,查看rhcs1节点的11111端口,8084端口有没有在监听,rhcs2
节点的11111端口有没有在监听
/etc/init.d/ricci start
/etc/init.d/luci start
配置luci集群设置
RHEL5 默认账户admin 密码就是刚才前面设置的.我这边设置111111
添加设置的ip和脚本
pkill -9 httpd
集群切换