systemd を利用した mariadb galera cluster first node の起動の仕方

Getting Started with MariaDB Galera Cluster - MariaDB Knowledge Baseには、

On newer operating system using systemd, boostrap is done using the script galera_new_cluster.


cat /usr/bin/galera_new_cluster

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.


systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
    systemctl start ${1:-mariadb}

systemctl set-environment _WSREP_NEW_CLUSTER=''