{"id":1901,"date":"2021-03-02T20:28:35","date_gmt":"2021-03-02T19:28:35","guid":{"rendered":"https:\/\/blog.mhasin.eu\/?p=1901"},"modified":"2021-03-02T20:28:36","modified_gmt":"2021-03-02T19:28:36","slug":"ubuntu-20-04-galera-cluster","status":"publish","type":"post","link":"https:\/\/blog.mhasin.eu\/?p=1901","title":{"rendered":"Ubuntu 20.04 galera cluster"},"content":{"rendered":"\n<p>Node1, node2 install package: (new mariadb package from own repository)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> apt-get install mariadb-server rsync mariadb-client<\/code><\/pre>\n\n\n\n<p>Master node:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/mysql\/mariadb.conf.d\/60-galera.cnf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;galera]\n# Mandatory settings\n# Server Configuration\nlog_error                = mariadbd.err\ninnodb_buffer_pool_size  = 1G\n\nwsrep_on                 = ON\nwsrep_cluster_name       = \"<strong>TEST Galera Cluster<\/strong>\"\nwsrep_provider           = \/usr\/lib\/libgalera_smm.so\nwsrep_cluster_address    = gcomm:\/\/<strong>192.168.3.201,192.168.3.202<\/strong>\nbinlog_format            = ROW\ndefault_storage_engine   = InnoDB\ninnodb_autoinc_lock_mode = 2\n\n# Allow server to accept connections on all interfaces.\nbind-address = 0.0.0.0\n\n# Optional settings\nwsrep_slave_threads = 1\ninnodb_flush_log_at_trx_commit = 0\nwsrep_node_name=\"<strong>db1<\/strong>\"\nwsrep_node_address=\"<strong>192.168.3.201<\/strong>\"\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl stop mariadb\nsudo galera_new_cluster<\/code><\/pre>\n\n\n\n<p>Test galera:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"show status like 'wsrep_cluster_size'\"<\/code><\/pre>\n\n\n\n<p>OUTPUT:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>+--------------------+-------+\n| Variable_name      | Value |\n+--------------------+-------+\n| wsrep_cluster_size | 1     |\n+--------------------+-------+<\/code><\/pre>\n\n\n\n<p>NODE2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/mysql\/mariadb.conf.d\/60-galera.cnf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;galera]\n# Mandatory settings\n# Server Configuration\nlog_error                = mariadbd.err\ninnodb_buffer_pool_size  = 1G\n\nwsrep_on                 = ON\nwsrep_cluster_name       = \"TEST Galera Cluster\"\nwsrep_provider           = \/usr\/lib\/libgalera_smm.so\nwsrep_cluster_address    = gcomm:\/\/192.168.3.201,192.168.3.202\nbinlog_format            = ROW\ndefault_storage_engine   = InnoDB\ninnodb_autoinc_lock_mode = 2\n\n# Allow server to accept connections on all interfaces.\nbind-address = 0.0.0.0\n\n# Optional settings\nwsrep_slave_threads = 1\ninnodb_flush_log_at_trx_commit = 0\nwsrep_node_name=\"db1\"\nwsrep_node_address=\"192.168.3.201\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart mariadb<\/code><\/pre>\n\n\n\n<p>test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p -e \"show status like 'wsrep_cluster_size'\"<\/code><\/pre>\n\n\n\n<p>OUTPUT:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>+--------------------+-------+\n| Variable_name      | Value |\n+--------------------+-------+\n| wsrep_cluster_size | 2     |\n+--------------------+-------+<\/code><\/pre>\n\n\n\n<p><\/p>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLQUA\" \/><input type=\"hidden\" name=\"blogName\" value=\"c\/LxdwcA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"M7Q0MAQA\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"C00qzSspVTAy0DMwUUhPzEktSlRIziktLkktAgA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLdW3L7A1tDQwBAA=\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"y00syfcwNAIA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtQ1MNY1MFIwMrAyMLYyNgUA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7VRdT9swFH3Pr7gq0tgESUgnocHaShsgxAN0GmV7mizHuQkWjp3ZDl0nfvzsNCkUImBDeyNVFcW+n+eee4JRNTlTGSbbIN1rCFwaS4WAirIrWuA+vJU4h5JqTrO0O4VcqxLUXILGShlulV68G8XVJHDPqNIITFBjxoN5FaZCsauQueCDyci\/JkArGxZoV7na6KFBfY0atFlItjpkgqO0o7hxdTk0tlkmp9RYZ+7r3n92ckmlghgti8uF+SniNk3ElMyjLN7dCQsqUNOIybwn6RPR32zsJR+XAX4EG3BKZUY9OGDQWi4L4w7Pl10euIS8qDW1XMlAqIKg1krDvWfcAZFF7j7g0rWbkrTOc9SkUkoQw3+jt0uOg2Bu3ECIkvAwzPSsvWWi9rgRSUtc3Q5Gxmoli8ns6HwGx00HcLC0HMXt3aCNUGl1zTPUa\/Hj2uhY8NT\/lwgQU5aRUffS0izTaMzSqWCqLPfjuMue7A2jZPdD9D4a7iTbd7+GqyqClEsPV650Se16k1+n34MMc1oLS4wD3nGVoCy4xOb6xKF3+LkDkdZWccmInyIp3ficxTBwE\/okhJpDy0argDKGlQVHEYnMj8uAg9gzl0vXUk4ZmsiXlYVdd2PYiZqfjzetvBMVtyxYQmIEvUZiLzXSzLskXWW5w+qS+CapJVb\/Ih4mbn3U1tWTvpngeDW5LE0eTKoxa2u6tVxD+Y7P3\/Pd1JkCs3CDLZl1\/VlVdXwNmruWCU5DOgL0bfIMjW1Nn7\/Jzf5CWINWykJYQYgwMJd+cpba2oDgVwib6+zzy7I56KthejH7cjF7fvqtsOfpDreCG\/jmcUgF3lk0fyhqhJvgSe+HZTvvZBnlCe++7s6mh0fDV5V8qUr2qOP\/E8VHxPBVA9c10Glfv+StYTh4scC5oJZq27Gtb9OsM3kVsUdEbPjPIta09Qc=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"https:\/\/blog.mhasin.eu\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"Node1, node2 install package: (new mariadb package from own repository) Master node: Test galera: OUTPUT: NODE2: test: OUTPUT: &nbsp;&nbsp; Send article as PDF &nbsp;&nbsp;\n","protected":false},"author":1,"featured_media":1902,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"arc_restricted_post":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1901"}],"version-history":[{"count":1,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1901\/revisions"}],"predecessor-version":[{"id":1903,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1901\/revisions\/1903"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/media\/1902"}],"wp:attachment":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}