keepalivedmysql主主同步mysql高可用(ha)集群

keepalivedmysql主主同步mysql高可用(ha)集群

ID:34724030

大小:57.53 KB

頁數(shù):8頁

時(shí)間:2019-03-10

keepalivedmysql主主同步mysql高可用(ha)集群_第1頁
keepalivedmysql主主同步mysql高可用(ha)集群_第2頁
keepalivedmysql主主同步mysql高可用(ha)集群_第3頁
keepalivedmysql主主同步mysql高可用(ha)集群_第4頁
keepalivedmysql主主同步mysql高可用(ha)集群_第5頁
資源描述:

《keepalivedmysql主主同步mysql高可用(ha)集群》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫

1、1.這個(gè)環(huán)境最大的缺陷在于主機(jī)寫入速度極慢,主鍵重復(fù)。2.mysql最好采用5.6以上集群版本,5.5以下單線程版本不大適合。博客中的mysql為5.5,實(shí)際測試挺差的,換成5.6之后十分完美,請各位運(yùn)維在意一下。環(huán)境:CentOS6.4apache2.4.4PHP5.3.27MYSQL5.5.33機(jī)器vip192.168.1.100MASTER:192.168.1.101BACKUP:192.168.1.102高可用部分:yuminstallipvsadmyuminstallkeepalivediptables–F如果不允許禁用iptables請?jiān)?e

2、tc/sysconfig/iptables里面加上-A?INPUT?-d?224.0.0.18/16?-j?ACCEPT??(vrrp的組播)-A?INPUT??-p?vrrp?-j?ACCEPT-A?INPUT-mstate–stateNEW-mtcp-ptcp–dport3306-jACCEPserviceiptablesrestartsetenforce0MASTER:vi/etc/keepalived/keepalived.confglobal_defs{notification_email{????????barbytang@hotmail.c

3、om??#郵件地址????}????router_idLVS1}vrrp_sync_groupGLVS{group{????mysqlha??????????????????????#組名?}}vrrp_instancemysqlha{????stateMASTER????????????????????????????????????????????????(經(jīng)過測試這里寫MASTER或者BUCKUP對整個(gè)系統(tǒng)都沒有影響)????interfaceeth0?????????????????????????????????????????????????

4、?(注意看當(dāng)前工作網(wǎng)卡,我就有過遇到bond0的狀況)????lvs_sync_daemon_intefaceeth0????virtual_router_id51????priority180????advert_int1authentication{????auth_typePASS????auth_pass1111}virtual_ipaddress{????192.168.1.100}}virtual_server192.168.1.1003306{??????????#mysql端口????delay_loop6????lb_algorr???

5、???????????????????????????????????????????????????#LVS????lb_kindDR????????????????????????????????????????????????????#LVS采用DR模式????persistence_timeout20????protocolTCP????sorry_server192.168.1.1023306????real_server192.168.1.1013306{????????????????????#buckup機(jī)器也這么寫,原因是因?yàn)樽屨9ぷ?/p>

6、時(shí)只用101????weight3????TCP_CHECK{????connect_timeout3????nb_get_retry3????delay_before_retry3????connect_port3306}}}BACKUP:vim/etc/keepalived/keepalived.confglobal_defs{notification_email{????????barbytang@hotmail.com????}????router_idLVS1}vrrp_sync_grouptest{group{????mysqlha}}vrr

7、p_instancemysqlha{????stateBACKUP????interfaceeth0????lvs_sync_daemon_intefaceeth0????virtual_router_id51????priority150????advert_int1authentication{????auth_typePASS????auth_pass1111}virtual_ipaddress{????192.168.1.100}}virtual_server192.168.1.1003306{????delay_loop6????lb_algo

8、rr????lb_kindDR????persistence_timeout20

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動(dòng)畫的文件,查看預(yù)覽時(shí)可能會(huì)顯示錯(cuò)亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時(shí)聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動(dòng)等原因無法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶請聯(lián)系客服處理。