mysql高可用heartbeat和drbd综合应用.docx

上传人:b****5 文档编号:6247783 上传时间:2023-01-04 格式:DOCX 页数:54 大小:3.65MB
下载 相关 举报
mysql高可用heartbeat和drbd综合应用.docx_第1页
第1页 / 共54页
mysql高可用heartbeat和drbd综合应用.docx_第2页
第2页 / 共54页
mysql高可用heartbeat和drbd综合应用.docx_第3页
第3页 / 共54页
mysql高可用heartbeat和drbd综合应用.docx_第4页
第4页 / 共54页
mysql高可用heartbeat和drbd综合应用.docx_第5页
第5页 / 共54页
点击查看更多>>
下载资源
资源描述

mysql高可用heartbeat和drbd综合应用.docx

《mysql高可用heartbeat和drbd综合应用.docx》由会员分享,可在线阅读,更多相关《mysql高可用heartbeat和drbd综合应用.docx(54页珍藏版)》请在冰豆网上搜索。

mysql高可用heartbeat和drbd综合应用.docx

mysql高可用heartbeat和drbd综合应用

拓扑图如下

今天做的是单从库模式

I

我的规划

Mastereth0192.168.48.128eth110.0.0.128vip192.168.48.130

Backupeth0192.168.48.129eth210.0.0.129vip192.168.48.131

1)配置ip地址

Masterip

[root@localhost~]#ifconfig

eth0Linkencap:

EthernetHWaddr00:

0C:

29:

5F:

1C:

77

inetaddr:

192.168.48.128Bcast:

192.168.48.255Mask:

255.255.255.0

inet6addr:

fe80:

:

20c:

29ff:

fe5f:

1c77/64Scope:

Link

UPBROADCASTRUNNINGMULTICASTMTU:

1500Metric:

1

RXpackets:

150errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

126errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

1000

RXbytes:

34457(33.6KiB)TXbytes:

15884(15.5KiB)

Interrupt:

19Baseaddress:

0x2024

eth1Linkencap:

EthernetHWaddr00:

0C:

29:

5F:

1C:

81

inetaddr:

10.0.0.128Bcast:

10.0.0.255Mask:

255.255.255.0

inet6addr:

fe80:

:

20c:

29ff:

fe5f:

1c81/64Scope:

Link

UPBROADCASTRUNNINGMULTICASTMTU:

1500Metric:

1

RXpackets:

48errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

14errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

1000

RXbytes:

7170(7.0KiB)TXbytes:

1561(1.5KiB)

Interrupt:

19Baseaddress:

0x20a4

loLinkencap:

LocalLoopback

inetaddr:

127.0.0.1Mask:

255.0.0.0

inet6addr:

:

:

1/128Scope:

Host

UPLOOPBACKRUNNINGMTU:

16436Metric:

1

RXpackets:

16errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

16errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

0

RXbytes:

960(960.0b)TXbytes:

960(960.0b)

Backupip

[root@localhost~]#ifconfig

eth0Linkencap:

EthernetHWaddr00:

0C:

29:

E4:

B3:

4C

inetaddr:

192.168.48.129Bcast:

192.168.48.255Mask:

255.255.255.0

inet6addr:

fe80:

:

20c:

29ff:

fee4:

b34c/64Scope:

Link

UPBROADCASTRUNNINGMULTICASTMTU:

1500Metric:

1

RXpackets:

3301errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

2007errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

1000

RXbytes:

4746098(4.5MiB)TXbytes:

117672(114.9KiB)

Interrupt:

19Baseaddress:

0x2024

eth1Linkencap:

EthernetHWaddr00:

0C:

29:

E4:

B3:

56

inetaddr:

10.0.0.129Bcast:

10.0.0.255Mask:

255.255.255.0

inet6addr:

fe80:

:

20c:

29ff:

fee4:

b356/64Scope:

Link

UPBROADCASTRUNNINGMULTICASTMTU:

1500Metric:

1

RXpackets:

42errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

21errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

1000

RXbytes:

5936(5.7KiB)TXbytes:

2635(2.5KiB)

Interrupt:

19Baseaddress:

0x20a4

loLinkencap:

LocalLoopback

inetaddr:

127.0.0.1Mask:

255.0.0.0

inet6addr:

:

:

1/128Scope:

Host

UPLOOPBACKRUNNINGMTU:

16436Metric:

1

RXpackets:

16errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

16errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

0

RXbytes:

960(960.0b)TXbytes:

960(960.0b)

2)配置主机名

Master

[root@localhost~]#hostnamedata-1-1

[root@localhost~]#hostname

[root@localhost~]#sed-i's#HOSTNAME=localhost.localdomain#HOSTNAME=data-1-1#g'/etc/sysconfig/network

[root@localhost~]#cat/etc/sysconfig/networkNETWORKING=yes

HOSTNAME=data-1-1

[root@data-1-1~]#cp/etc/hosts/etc/hosts.bak001

[root@data-1-1~]#ls/etc/host*

/etc/host.conf/etc/hosts.allow/etc/hosts.deny

/etc/hosts/etc/hosts.bak001

[root@data-1-1~]#

[root@data-1-1~]#pingdata-1-2

PINGdata-1-2(192.168.48.129)56(84)bytesofdata.

64bytesfromdata-1-2(192.168.48.129):

icmp_seq=1ttl=64time=0.315ms

64bytesfromdata-1-2(192.168.48.129):

icmp_seq=2ttl=64time=1.16ms

64bytesfromdata-1-2(192.168.48.129):

icmp_seq=3ttl=64time=0.393ms

64bytesfromdata-1-2(192.168.48.129):

icmp_seq=4ttl=64time=0.461ms

[root@data-1-1~]#cat/etc/hosts

127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4

:

:

1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6

192.168.48.128data-1-1

192.168.48.129data-1-2

[root@data-1-1~]#uname-n

data-1-1

Backup

[root@localhost~]#hostnamedata-1-2

[root@localhost~]#hostname

data-1-2

[root@localhost~]#sed-i's#HOSTNAME=localhost.localdomain#HOSTNAME=data-1-2#g'/etc/sysconfig/network

[root@localhost~]#cat/etc/sysconfig/network

NETWORKING=yes

HOSTNAME=data-1-2

[root@data-1-1~]#cat>>/etc/hosts<

>192.168.48.128data-1-1

>192.168.48.129data-1-2

>haha

[root@data-1-2~]#cp/etc/hosts/etc/hosts.bak001

[root@data-1-2~]#ls/etc/host*

/etc/host.conf/etc/hosts.allow/etc/hosts.deny

/etc/hosts/etc/hosts.bak001

[root@data-1-2~]#

[root@data-1-2~]#cat>>/etc/hosts<

>192.168.48.128data-1-1

>192.168.48.129data-1-2

>haha

[root@data-1-2~]#pingdata-1-1

PINGdata-1-1(192.168.48.128)56(84)bytesofdata.

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=1ttl=64time=1.00ms

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=2ttl=64time=0.417ms

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=3ttl=64time=0.251ms

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=4ttl=64time=0.472ms

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=5ttl=64time=0.474ms

64bytesfromdata-1-1(192.168.48.128):

icmp_seq=6ttl=64time=0.382ms

[root@data-1-2~]#cat/etc/hosts

127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4

:

:

1localhostlocalhost.localdomainlocalhost6localhost6.localdomain6

192.168.48.128data-1-1

192.168.48.129data-1-2

[root@data-1-2~]#uname-n

data-1-2

3)增加路由

Master

[root@data-1-1~]#routeadd-host10.0.0.129deveth1

[root@data-1-1~]#route-n

KernelIProutingtable

DestinationGatewayGenmaskFlagsMetricRefUseIface

10.0.0.1290.0.0.0255.255.255.255UH000eth1

10.0.0.00.0.0.0255.255.255.0U100eth1

192.168.48.00.0.0.0255.255.255.0U100eth0

0.0.0.0192.168.48.20.0.0.0UG000eth0

[root@data-1-1~]#echo'/sbin/routeadd-host10.0.0.129deveth1'>>/etc/rc.local

Backup

[root@data-1-2~]#routeadd-host10.0.0.128deveth1

[root@data-1-2~]#route-n

KernelIProutingtable

DestinationGatewayGenmaskFlagsMetricRefUseIface

10.0.0.1280.0.0.0255.255.255.255UH000eth1

10.0.0.00.0.0.0255.255.255.0U100eth1

192.168.48.00.0.0.0255.255.255.0U100eth0

0.0.0.0192.168.48.20.0.0.0UG000eth0

[root@data-1-2~]#echo'/sbin/routeadd-host10.0.0.128deveth1'>>/etc/rc.local

快速安装heartbeat

4)开始实施部署

对于centos6.5安装heartbeat3.0软件

安装epel包

Master

[root@data-1-1~]#

wgethttp:

//mirrors.ustc.edu/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

--2016-03-2900:

07:

32--http:

//mirrors.ustc.edu/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

Resolvingmirrors.ustc.edu...202.100.68.118

Connectingtomirrors.ustc.edu|202.100.68.118|:

80...connected.

HTTPrequestsent,awaitingresponse...200OK

Length:

730[text/html]

Savingto:

“epel-release-6-8.noarch.rpm”

100%[============================>]730--.-K/sin0s

2016-03-2900:

07:

32(97.2MB/s)-“epel-release-6-8.noarch.rpm”saved[730/730]

[root@data-1-1~]#ls

anaconda-ks.cfgDownloadsMusicVideos

a.txtepel-release-6-8.noarch.rpmPictures

Desktopinstall.logPublic

Documentsinstall.log.syslogTemplates

[root@data-1-1~]#yum-yinstallepel-*

Loadedplugins:

fastestmirror,refresh-packagekit,security

Loadingmirrorspeedsfromcachedhostfile

*base:

*extras:

mirrors.yun-

*updates:

mirrors.yun-

SettingupInstallProcess

Cannotopen:

epel-release-6-8.noarch.rpm.Skipping.

Examiningepel-rpm-macros-6-4.noarch.rpm:

epel-rpm-macros-6-4.noarch

Markingepel-rpm-macros-6-4.noarch.rpmtobeinstalled

ResolvingDependencies

-->Runningtransactioncheck

--->Packageepel-rpm-macros.noarch0:

6-4willbeinstalled

-->ProcessingDependency:

epel-release=6forpackage:

epel-rpm-macros-6-4.noarch

-->Runningtransactioncheck

--->Packageepel-release.noarch0:

6-8willbeinstalled

-->FinishedDependencyResolution

DependenciesResolved

========================================================================================================================================================================

PackageArchVersionRepositorySize

========================================================================================================================================================================

Installing:

epel-rpm-macrosnoarch6-4/epel-rpm-macros-6-4.noarch19k

Installingfordependencies:

epel-releasenoarch6-8extras14k

TransactionSummary

========================================================================================================================================================================

Install2Package(s)

Totalsize:

33k

Totaldownloadsize:

14k

Installedsize:

40k

DownloadingPackages:

epel-release-6-8.noarch.rpm|14kB00:

00

Runningrpm_check_debug

RunningTransactionTest

TransactionTestSucceeded

RunningTransaction

Installing:

epel-release-6-8.noarch1/2

Installing:

epel-rpm-macros-6-4.noarch2/2

Verifying:

epel-rpm-macros-6-4.noarch1/2

Verifying:

epel-release-6-8.noarch2/2

Installed:

epel-rpm-macros.noarch0:

6-4

DependencyInstalled:

epel-release.noarch0:

6-8

Complete!

[root@data-1-1~]#rpm-ivhepel-rpm-macros-6-4.noarch.rpm

warning:

epel-rpm-macros-6-4.noarch.rpm:

HeaderV3RSA/SHA256Signature,keyID0608b895:

NOKEY

Preparing...###########################################[100%]

packageepel-rpm-macros-6-4.noarchisalreadyinstalled

[root@data-1-1~]#

[root@data-1-1~]#rpm-qa|grepepel

epel-release-6-8.noarch

epel-rpm-macros-6-4.noarch

[root@data-1-1~]#

Backup

[root@data-1-2~]#

wgethttp:

//mirrors.ustc.edu/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

--2016-03-2900:

07:

48--http:

//mirrors.ustc.edu/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

Resolvingmirrors.ustc.edu...202.100.68.118

Connectingtomirrors.ustc.edu|202.100.68.118|:

80...connected.

HTTPrequestsent,awaitingresponse...200OK

Length:

730[text/html]

Savingto:

“epel-release-6-8.noarch.rpm”

100%[======================================>]730--.-K/sin0s

2016-03-2

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 起诉状

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1