(? ) The Corosync of the enterprise part of the "Unfinished picture"

Source: Internet
Author: User
Tags install openssl rpmbuild

Need a pure virtual machine, need to recompile the kernel, in order to improve the speed of compiling,4CPU,2048 memory.


Kernel source linux-2.6.32-220.23.1.el6.x86_64

Use Dvd.repo to do yum source

Required Packages:kernel-2.6.32-220.23.1.el6.src.rpm lvs-fullnat-synproxy.tar.gz

Resolve dependencies:asciidoc-8.4.5-4.1.el6.noarch.rpm newt-devel-0.52.11-3.el6.x86_64.rpm slang-devel-2.2.1-1.el6.x86_64. RPM

RPM-IVH kernel-2.6.32-220.23.1.el6.src.rpm Yum install-y rpm-builduname-r
CD Rpmbuild/specs/yum install-y gcc redhat-rpm-config patchutils xmlto asciidoc elfutils-libelf-devel zlib-devel binutil S-devel newt-devel python-devel perl-extutils-embed hmaccalccdyum Install asciidoc-8.4.5-4.1.el6.noarch.rpm newt-devel-0.52.11-3.el6.x86_64.rpm slang-devel-2.2.1-1.el6.x86_64.rpm-yrpmbuild-bp Kerbel.spec # #较长时间, available through RNGD-R/ Dev/urando solution (Install rngd-tools)


Cd/root/rpmbuild/build/kernel-2.6.32-220.23.1.el6/tar zxf LVS-FULLNAT-SYNPROXY.TAR.GZCD LVS-FULLNAT-SYNPROXY/CP Lvs-2.6.32-220.23.1.el6.patch. /LINUX-2.6.32-220.23.1.EL6.X86_64/CD. CD Linux-2.6.32-220.23.1.el6.x86_64/yum install-y Patchpatch-p1 < lvs-2.6.32-220.23.1.el6.patch vim. Configvim MAKEFILEUNAME-RCD Configs/diff Kernel-2.6.32-x86_64.config. /.config


Add a 20G virtual hard disk

Fdisk-cu/dev/vdcpvcreate/dev/vdc1vgextend volgroup/dev/vdc1lvextend-l +20g/dev/volgroup/lv_root lvextend-l +5119/d Ev/volgroup/lv_root resize2fs/dev/volgroup/lv_rootdf-h


Cd/root/rpmbuild/build/kernel-2.6.32-220.23.1.el6/linux-2.6.32-220.23.1.el6.x86_64make-j4make Modules_ Installmake Installcd/boot/grub/vim Grub.confreboot
Uname-r # #2.6.32-220.23.1.el6


CD RPMBUILD/BUILD/KERNEL-2.6.32-220.23.1.EL6/LVS-FULLNAT-SYNPROXY/CP Lvs-tools.tar.gz/roottar ZXF LVS-TOOLS.TAR.GZCD Tools/keepalived/yum Install openssl-devel popt-devel-y./configure--with-kernel-dir= "/lib/ modules/' uname-r '/build "Makemake Installwhich KEEPALIVEDCD. CD Ipvsadm/yum install-y ipvsadmmakemake installipvsadm--helpipvsadm-l


Required Packages:crmsh-1.2.6-0.rc2.2.1.x86_64.rpm pssh-2.3.1-2.1.x86_64.rpm

Use a virtual machine with a clustered environment

Determine if any other software is running

"Server1"

PS Ax # #将cman等服务关掉
/etc/init.d/ldirectord stopchkconfig Ldirectord Offyum install-y Pacemaker # #server1/server2
Rpm-q corosync/etc/init.d/keepalived status/etc/init.d/heartbeat status/etc/init.d/cman Status # #没关掉的关掉
CD/ETC/COROSYNC/CP corosync.conf.example Corosync.confvim corosync.conf

/etc/init.d/corosync status/etc/init.d/pacemaker Status

SCP corosync.conf [Email Protected]:/etc/corosync
/etc/init.d/corosync starttail-f/var/log/messages
Crm_verify-lcrm_verify-lv
Cdyum Install crmsh-1.2.6-0.rc2.2.1.x86_64.rpm pssh-2.3.1-2.1.x86_64.rpm-y
Crm

Status

Show

Property Stonith-enabled=false

Show

Commit

Quit

CRM Configure Show
Crm

Configure

Primitive VIP OCF:HEARTBEAT:IPADDR2 params ip=172.25.19.100 cidr_netmask=32 op monitor interval=30s

Show

Commit

Bye

/etc/init.d/corosync start
Crm

Property No-quorum-policy=ignore

Commit

Quit

/etc/init.d/corosync Stop/etc/init.d/corosync startvim/etc/httpd/conf/httpd.confrpm-q httpd CRM

Primitive website Ocf:heartbeat:apache params configfile=/etc/httpd/conf/httpd.conf op monitor interval=60s

Commit

Collocation Website-with-ip inf:website VIP

Commit

Show

Delete Website-with-ip

Commit

Group Apache VIP website

Commit

Show

Cd

Node

Show

Standby server2.example.com

Online server2.example.com

Quit

Cat/proc/drbddrbdadm Primary SqlData mount/dev/drbd1/var/lib/mysql/df-humount/var/lib/mysql//etc/init.d/mysqld Start/etc/init.d/mysqld Stop CRM

Resource

Show

Stop Apache

Bye

/etc/init.d/corosync Start CRM

Configure

Show

Delete Apache

Delete website

Show

Commit

Ctrl-c, leaving

Cd/etc/cluster/lsstonith_admin-istonith_admin-m-a FENCE_XVM CRM

Configure

Property Stonith-enabled=true

Commit

Primitive vmfence STONITH:FENCE_XVM params pcmk_host_map= "server1.example.com:vm1;server2.example.com:vm2" Op Monitor Interval=1min

Commit

Bye

IP addr showip addr del 172.25.19.100/32 dev eth0/etc/init.d/network stop/etc/init.d/corosync start "Server2"
/etc/init.d/ldirectord stopchkconfig ldirectord offyum install-y pacemaker/etc/init.d/corosync Startcdls Yum install-y *crmcrm_mon Rpm-q Httpdvim/etc/httpd/conf/httpd.confcrm_mon

"Physical Machine"

Systemctl status Fence_virtdsystemctl start fence_virtdsystemctl status Fence_virtdnetstat-anulp | grep 1229 is not finished. Figure exercises to fill up

(? ) The Corosync of the enterprise part of the "Unfinished picture"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.