手机版
你好,游客 登录 注册
背景:
阅读新闻

Linux下高可用群集之corosync+openais+pacemaker+web+drbd

[日期:2012-10-26] 来源:Linux社区  作者:gjp0731 [字体:大 中 小]

实现同一网段内的无障碍通讯!

[root@www2 ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)?
[root@www2 ~]# cd .ssh/
[root@www2 .ssh]# ls
id_rsa  id_rsa.pub
[root@www2 .ssh]# ssh-copy-id -i id_rsa.pub www1
10
The authenticity of host 'www1 (192.168.2.1)' can't be established.
RSA key fingerprint is 87:be:8b:a4:bd:11:11:10:c2:ec:2d:ef:02:68:f6:0e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'www1,192.168.2.1' (RSA) to the list of known hosts.
root@www1's password:
Now try logging into the machine, with "ssh 'www1'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

[root@www2 .ssh]# scp /etc/yum.repos.d/rhel-debuginfo.repo  www1:/etc/yum.repos.d/
rhel-debuginfo.repo                                              100%  318    0.3KB/s  00:00   
[root@www2 .ssh]# date
Wed Oct 24 11:30:30 CST 2012
[root@www2 .ssh]# ssh www1 'date'
Wed Oct 24 11:30:40 CST 2012

[root@www1 ~]# ssh-keygen -t rsa

[root@www1 .ssh]# ssh-copy-id -i id_rsa.pub www2

 

上传所需软件包:

[root@www2 ~]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@www2 ~]# yum localinstall -y *.rpm –nogpgcheck

 

验证corosync引擎是否正常启动了

[root@www2 ~]#  grep -i  -e "corosync cluster engine" -e "configuration file" /var/log/messages
Oct 24 11:09:03 www2 smartd[3259]: Opened configuration file /etc/smartd.conf
Oct 24 11:09:03 www2 smartd[3259]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Oct 24 17:09:07 www2 corosync[28610]:  [MAIN  ] Corosync Cluster Engine ('1.2.7'): started and ready to provide service.
Oct 24 17:09:07 www2 corosync[28610]:  [MAIN  ] Successfully read main configuration file '/etc/corosync/corosync.conf'.

[root@www2 Server]# yum install httpd -y

linux
相关资讯       DRBD  Corosync  Pacemaker  高可用群集 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款