From cb8b5e3a79aba381df19bcb221282fa9565f24a6 Mon Sep 17 00:00:00 2001 From: Ari Maniatis Date: Sun, 4 Jun 2017 19:04:13 +1000 Subject: [PATCH 1/3] Add FreeBSD instructions for installing mariadb and galera --- galeracluster/source/installmariadb.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/galeracluster/source/installmariadb.rst b/galeracluster/source/installmariadb.rst index 724493de..f0ee8324 100644 --- a/galeracluster/source/installmariadb.rst +++ b/galeracluster/source/installmariadb.rst @@ -3,14 +3,14 @@ MariaDB Galera Cluster - Binary Installation ============================================ .. _`galera-mariadb-binary-install`: -MariaDB Galera Cluster is the MariaDB implementation of Galera Cluster for MySQL. Binary installation packages are available for Debian- and RPM-based distributions of Linux through the MariaDB repository. +MariaDB Galera Cluster is the MariaDB implementation of Galera Cluster for MySQL. Binary installation packages are available for Debian- and RPM-based distributions of Linux through the MariaDB repository and for FreeBSD through its packaging system. --------------------------------- Enabling the MariaDB Repository --------------------------------- .. _`mariadb-repo`: -In order to install MariaDB Galera Cluster through your package manager, you need to first enable the MariaDB repository on your system. There are two different ways to accomplish this, depending on which Linux distribution you use. +In order to install MariaDB Galera Cluster through your package manager, you need to first enable the MariaDB repository on your system. There are two different ways to accomplish this, depending on which Linux distribution you use. Skip this step for FreeBSD. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Enabling the ``apt`` Repository @@ -105,7 +105,7 @@ Installing MariaDB Galera Cluster --------------------------------- .. _`mariadb-install`: -There are three packages involved in the installation of MariaDB Galera Cluster: the MariaDB database client, a command line tool for accessing the database; the MariaDB database server, built to include the :term:`wsrep API` patch; and the :term:`Galera Replication Plugin`. +There are three packages involved in the installation of MariaDB Galera Cluster: the MariaDB database client (a command line tool for accessing the database); the MariaDB database server, built to include the :term:`wsrep API` patch; and the :term:`Galera Replication Plugin`. For Debian-based distributions, in the terminal run the following command: @@ -123,6 +123,14 @@ For RPM-based distributions, instead run this command: MariaDB-Galera-server \ galera +For FreeBSD run this command: + +.. code-block:: console + + # pkg install databases/mariadb101-client \ + databases/mariadb101-server \ + databases/galera + MariaDB Galera Cluster is now installed on your server. You will need to repeat this process for each node in your cluster. .. note:: **See Also**: In the event that you installed MariaDB Galera Cluster over an existing standalone instance of MariaDB, there are some additional steps that you need to take in order to update your system to the new database server. For more information, see :doc:`migration`. From 9513918276f5b5bb0f164427dce29fe64eb3016c Mon Sep 17 00:00:00 2001 From: Ari Maniatis Date: Sun, 4 Jun 2017 19:32:30 +1000 Subject: [PATCH 2/3] FreeBSD docs --- galeracluster/source/configuration.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/galeracluster/source/configuration.rst b/galeracluster/source/configuration.rst index 534fd417..0f2bd910 100644 --- a/galeracluster/source/configuration.rst +++ b/galeracluster/source/configuration.rst @@ -119,7 +119,9 @@ The way to protect your node from such crashing is to ensure that you have suffi /swap/swap1 file 524284 0 -2 /swap/swap2 file 524284 0 -3 -If your system does not have swap space available or if the allotted space is insufficient for your needs, you can fix this by creating swap files. +On FreeBSD run ``swapinfo`` and consult the `documentation `_ for how to add more swap if you need it. + +On Linux, if your system does not have swap space available or if the allotted space is insufficient for your needs, you can fix this by creating swap files. #. Create an empty file on your disk, set the file size to whatever size you require. From 0946966bbfad86e5e2d8f909dfaa8a667c27c4ac Mon Sep 17 00:00:00 2001 From: Ari Maniatis Date: Mon, 5 Jun 2017 17:31:00 +1000 Subject: [PATCH 3/3] Starting a cluser for the first time on FreeBSD --- galeracluster/source/startingcluster.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/galeracluster/source/startingcluster.rst b/galeracluster/source/startingcluster.rst index 855b1696..51f6f56f 100644 --- a/galeracluster/source/startingcluster.rst +++ b/galeracluster/source/startingcluster.rst @@ -51,6 +51,12 @@ For systems that use ``systemd``, instead use this command: # systemctl start mysql --wsrep-new-cluster +For FreeBSD use this command: + +.. code-block:: console + + # mysql_args="--wsrep-new-cluster" /usr/local/etc/rc.d/mysql-server start + This starts ``mysqld`` on the node. .. note:: **Warning**: Only use the ``--wsrep-new-cluster`` argument when initializing the Primary Component. Do not use it when you want the node to connect to an existing cluster.