{"id":2798,"date":"2017-04-28T18:52:12","date_gmt":"2017-04-28T10:52:12","guid":{"rendered":"http:\/\/blog.pighead.cc\/whsyu\/?p=2798"},"modified":"2017-05-25T23:23:10","modified_gmt":"2017-05-25T15:23:10","slug":"galera-cluster-and-freebsd","status":"publish","type":"post","link":"https:\/\/blog.pighead.cc\/whsyu\/2017\/04\/28\/galera-cluster-and-freebsd\/","title":{"rendered":"galera cluster \u8207 FreeBSD"},"content":{"rendered":"<p class=\"bb-post-separator\"><strong>[\u83ef\u8a9e, cmn-Hant-TW]  <\/strong><\/p><p>\u5728 Galera \u7684\u5b98\u7db2\u770b\u5230\u00a0<a href=\"http:\/\/galeracluster.com\/2017\/01\/galera-cluster-packages-and-support-for-freebsd-are-now-available-from-codership\/\">\u9019\u7bc7<\/a>\uff0c\u60f3\u8aaa\u65e2\u7136\u5b98\u65b9\u6709\u51fa\u652f\u63f4 FreeBSD \u7684\u65b0\u7248\uff0c\u6700\u8fd1\u525b\u597d\u6709\u74b0\u5883\u800c\u4e14\u6709\u7528\u5230\u7684\u9700\u6c42\uff0c\u5c31\u60f3\u8aaa\u4f86\u8a66\u7528\u770b\u770b\uff0c\u53e4\u65e9\u6642\u5019\u66fe\u7d93\u7528 ports \u88e1\u9762\u7684 <a href=\"https:\/\/www.freshports.org\/databases\/galera\/\">databases\/galera<\/a> \u5f04\u4e86\u8001\u534a\u5929\u6c92\u6210\u529f\uff0c\u770b\u73fe\u5728\u6709\u6c92\u6709\u6bd4\u8f03\u7c21\u55ae\u4e9b<\/p>\n<p><strong>\u7d50\u8ad6\u5c31\u662f galera + mariadb\u00a0\u53ef\u4ee5\u8dd1\u6c92\u554f\u984c\uff0c\u4f46\u662f\u76ee\u524d\u6709\u4e9b\u9650\u5236\u5b58\u5728<\/strong><\/p>\n<p>\u56e0\u70ba Codership \u662f\u76f4\u63a5\u653e port \u6a94\uff0c\u6240\u4ee5\u4e0b\u8f09\u5f8c\u7528\u5e73\u5e38\u7de8\u8b6f port \u7684\u65b9\u5f0f\u7de8\u5373\u53ef\uff0c\u7406\u8ad6\u4e0a\u9019\u4e9b\u6771\u897f\u61c9\u8a72\u9084\u662f\u6703\u76f4\u63a5\u9032 ports \u5427\uff0c\u5230\u6642\u5019\u7528\u8d77\u4f86\u61c9\u8a72\u6703\u66f4\u65b9\u4fbf\u624d\u662f\uff0c\u540c\u4e00\u5305\u88e1\u9762\u9084\u6709 mysql 5.6 \u8ddf mysql 5.7 \u7684 cluster patch\uff0c\u4e0d\u904e\u6211\u6253\u7b97\u7528 mariadb 10.1 \u4f86\u8a66\u6240\u4ee5\u6c92\u7528\u5230 (\u4e0d\u904e\u6a5f\u5668\u6709\u4e9b\u662f 10.x \u6709\u4e9b\u662f 11.x)<\/p>\n<p>\u57fa\u672c\u4e0a\u5404\u53f0\u6a5f\u5668\u8a2d\u5b9a\u53c3\u8003\u5b98\u7db2\u7684 <a href=\"http:\/\/galeracluster.com\/documentation-webpages\/configuration.html\">System Configuration<\/a>\u00a0\u8ddf <a href=\"http:\/\/galeracluster.com\/documentation-webpages\/dbconfiguration.html\">Replication Configuration<\/a> \u5373\u53ef\uff0c\u9664\u4e86\u57fa\u672c\u7684\u90e8\u4efd\u5916\uff0c\u6bcf\u53f0\u7684 wsrep_node_name \u8ddf\u00a0wsrep_node_address \u90fd\u8981\u8a2d\u6210\u4e0d\u4e00\u6a23 (\u7576\u7136\u8981\u5728 wsrep_cluster_address \u7684\u6e05\u55ae\u88e1\u9762)\uff0c\u9664\u4e86\u7b2c\u4e00\u53f0\u555f\u52d5\u7684\u65b9\u5f0f\u6bd4\u8f03\u7279\u5225\u5916\uff0c\u5176\u4ed6\u7684\u5c31\u8ddf\u4e00\u822c rc.conf \u7684\u555f\u52d5\u65b9\u5f0f\u6a23\uff0c\u7b2c\u4e00\u53f0\u9700\u8981\u4e0b\u53c3\u6578\uff0c\u6240\u4ee5\u6211\u6703\u7528 mysqld_safe\u00a0&#8211;wsrep-new-cluster \u624b\u52d5\u4e0b\uff0c\u7b49\u5225\u53f0\u4e0a\u7dda\u5f8c\u9019\u53f0\u518d\u624b\u52d5\u95dc\u6389\u91cd\u65b0\u7528 rc.conf \u555f\u52d5\uff0c\u6bcf\u4e00\u500b\u65b0\u7684\u7bc0\u9ede\u4e0a\u7dda\u7684\u6642\u5019\u61c9\u8a72\u6703\u7528 SST \u50b3\uff0c\u57fa\u672c\u4e0a\u9810\u8a2d\u5c31\u662f\u7528 rsync \u628a\u4e00\u5927\u5305\u6771\u897f\u4e1f\u904e\u53bb\u5c31\u662f (\u5176\u5be6\u6709\u7a0d\u5fae\u8a66\u4e86\u4e00\u4e0b\u5176\u4ed6\u7684\u65b9\u6cd5\u4e0d\u904e\u4e00\u76f4\u5361\u95dc\uff0c\u6240\u4ee5\u5c31\u7e7c\u7e8c\u7528 rsync)\uff0c\u65b0\u7bc0\u9ede\u4e0a\u9664\u4e86 rsync \u5916\u9084\u6703\u7528\u5230 lsof\uff0c\u6240\u4ee5\u9664\u4e86\u8cc7\u6599\u5eab\u76f8\u95dc\u7684\u5957\u4ef6\u5916\uff0cnet\/rsync \u8ddf\u00a0sysutils\/lsof \u4e5f\u5f97\u88dd\u4e00\u4e0b\uff0c\u4e0d\u7136\u9023 mysqld \u90fd\u8dd1\u4e0d\u8d77\u4f86<\/p>\n<p>\u53c8\u56e0\u70ba\u6709\u53ef\u80fd\u6703\u6709 WAN \u540c\u6b65\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u4e5f\u7814\u7a76\u4e86\u4e00\u4e0b\u600e\u9ebc\u4e0a SSL\uff0c\u4e0d\u904e mysqld \u4e00\u76f4\u5403\u5230 signal 11 \u5f8c\u4f86\u5c31\u66ab\u6642\u4e0d\u7406\u9019\u500b\u4e86\uff0c\u6709\u8208\u8da3\u7684\u8a71\u53ef\u4ee5\u53c3\u8003 <a href=\"http:\/\/galeracluster.com\/documentation-webpages\/sslconfig.html\">SSL Configuration<\/a>\uff0c\u65e2\u7136\u6c92\u8fa6\u6cd5\u958b SSL\uff0c\u771f\u7684\u8981\u904e\u7db2\u969b\u7db2\u8def\u7684\u8a71\u5916\u9762\u9084\u662f\u5f97\u5148\u7528 vpn \u5305\u597d\u6bd4\u8f03\u59a5\u7576<\/p>\n<p>\u9644\u5e36\u4e00\u63d0\uff0c\u8981\u6e2c\u6548\u80fd\u7684\u8a71\u53ef\u4ee5\u7528 sysbench \u53bb\u6e2c\uff0c\u9019\u500b\u8ddf FreeBSD \u6bd4\u8f03\u7121\u95dc\uff0c\u5176\u4ed6\u5e73\u53f0\u4e5f\u662f\u4e00\u6a23\u7684<\/p>\n<h5>UPDATAE 2017-05-25<\/h5>\n<p>\u9019\u7248 (25.3.20) <a href=\"https:\/\/svnweb.freebsd.org\/ports?view=revision&amp;revision=441450\">\u5df2\u9032 ports<\/a>\uff0c\u73fe\u5728\u53ef\u4ee5\u76f4\u63a5\u7528 make \u5b89\u88dd\uff0c\u6216\u662f\u7528 pkg \u88dd\u90fd\u6c92\u554f\u984c\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[\u83ef\u8a9e, cmn-Hant-TW] \u5728 Galera \u7684\u5b98\u7db2\u770b\u5230\u00a0\u9019\u7bc7\uff0c\u60f3\u8aaa\u65e2\u7136\u5b98\u65b9\u6709\u51fa\u652f\u63f4 FreeBSD \u7684\u65b0\u7248\uff0c\u6700\u8fd1\u525b\u597d\u6709\u74b0\u5883\u800c\u4e14\u6709\u7528\u5230\u7684\u9700\u6c42\uff0c\u5c31\u60f3\u8aaa\u4f86\u8a66\u7528\u770b\u770b\uff0c\u53e4\u65e9\u6642\u5019\u66fe\u7d93\u7528 ports \u88e1\u9762\u7684 databases\/galera \u5f04\u4e86\u8001\u534a\u5929\u6c92\u6210\u529f\uff0c\u770b\u73fe\u5728\u6709\u6c92\u6709\u6bd4\u8f03\u7c21\u55ae\u4e9b \u7d50\u8ad6\u5c31\u662f galera + mariadb\u00a0\u53ef\u4ee5\u8dd1\u6c92\u554f\u984c\uff0c\u4f46\u662f\u76ee\u524d\u6709\u4e9b\u9650\u5236\u5b58\u5728 \u56e0\u70ba Codership \u662f\u76f4\u63a5\u653e port \u6a94\uff0c\u6240\u4ee5\u4e0b\u8f09\u5f8c\u7528\u5e73\u5e38\u7de8\u8b6f port \u7684\u65b9\u5f0f\u7de8\u5373\u53ef\uff0c\u7406\u8ad6\u4e0a\u9019\u4e9b\u6771\u897f\u61c9\u8a72\u9084\u662f\u6703\u76f4\u63a5\u9032 ports \u5427\uff0c\u5230\u6642\u5019\u7528\u8d77\u4f86\u61c9\u8a72\u6703\u66f4\u65b9\u4fbf\u624d\u662f\uff0c\u540c\u4e00\u5305\u88e1\u9762\u9084\u6709 mysql 5.6 \u8ddf mysql 5.7 \u7684 cluster patch\uff0c\u4e0d\u904e\u6211\u6253\u7b97\u7528 mariadb 10.1 \u4f86\u8a66\u6240\u4ee5\u6c92\u7528\u5230 (\u4e0d\u904e\u6a5f\u5668\u6709\u4e9b\u662f 10.x \u6709\u4e9b\u662f 11.x) \u57fa\u672c\u4e0a\u5404\u53f0\u6a5f\u5668\u8a2d\u5b9a\u53c3\u8003\u5b98\u7db2\u7684&hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[4591,4580],"class_list":["post-2798","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-freebsd","tag-mysql"],"_links":{"self":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/comments?post=2798"}],"version-history":[{"count":10,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2798\/revisions"}],"predecessor-version":[{"id":2815,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2798\/revisions\/2815"}],"wp:attachment":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/media?parent=2798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/categories?post=2798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/tags?post=2798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}