0% found this document useful (0 votes)
14 views4 pages

MARIADB

mariadb

Uploaded by

mohdnabeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

MARIADB

mariadb

Uploaded by

mohdnabeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

MARIADB

BAB 1 : Installasi MariaDB di Centos 7


Tujuan “:
Lab kali ini akan melakukan installasi MariaDB 10 untuk di jadikan cluster pada 3 node
server

Installasi epel repo


yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-
7.noarch.rpm

Konfigurasi Repository MariaDB 10


nano /etc/yum.repos.d/MariaDB.repo

====
# MariaDB 10.1 CentOS repository list - created 2016-09-26 11:34 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
=====

Installasi Maria Package


yum install MariaDB-server MariaDB-client MariaDB-compat galera socat
jemalloc –y

Install Innobackupex
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-
3/percona-release-0.1-3.noarch.rpm
yum install percona-xtrabackup-24

Disable selinux
nano /etc/sysconfig/selinux
====
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are
protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
=========

Disable firewall:
chkconfig firewalld off
systemctl stop firewalld

Disable boot service mysql (all node)


chkconfig mysql off

Setup maria db first installation (only for node 1 !!!)


systemctl start mysqld
mysql_secure_installation
pass root : itcenter (sample)
(make sure disable root access and anynomous from outside)

mysql -u root –p
CREATE USER 'sst_puskom'@'localhost' IDENTIFIED BY '20puskom16';
GRANT PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO
'sst_puskom'@'localhost';
FLUSH PRIVILEGES;

setup node 1 only


nano /etc/my.cnf.d/server.cnf

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers


[server]

# this is only for the mysqld standalone daemon


[mysqld]
datadir=/var/lib/mysql
tmpdir=/tmp
#
# * Galera-related settings
#
[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://172.16.85.123,172.16.85.124,172.16.85.125"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0

wsrep_cluster_name="SRSCluster"
wsrep_node_address="172.16.85.123"
wsrep_node_name="node1"
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth="sst_puskom:20puskom16"

#
# Allow server to accept connections on all interfaces.
#
bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2

# this is only for embedded server


[embedded]

# This group is only read by MariaDB servers, not by MySQL.


# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.1 servers.


# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]

You might also like