MariaDB +Centos+MMM 叢集安裝除錯
流行的mysql叢集的使用
環境
伺服器環境是Centos7.8,MariaDB版本 5.5.65-MariaDB
主機 | ip | 備註 |
mmm-monitor | 192.168.137.124 | 獨立機器 |
mmm-master1 | 192.168.137.201 | 與master2互為備份,是slave1的主 |
mmm-master2 | 192.168.137.202 | 和master互為高可用。 |
mmm-slave1 | 192.168.137.203 | 是master1的從 |
總圖架構。
安裝mariadb
1) 在mmm-master,mmm-master2,mmm-slave2 上安裝mariadb
在這三臺機器上 執行查詢我們需要安裝的版本
[root@mmm-monitor ~]# yum list |grep mariadb
mariadb.x86_64 1:5.5.65-1.el7 @base
mariadb-libs.x86_64 1:5.5.65-1.el7 @anaconda
mariadb-bench.x86_64 1:5.5.65-1.el7 base
mariadb-devel.i686 1:5.5.65-1.el7 base
mariadb-devel.x86_64 1:5.5.65-1.el7 base
mariadb-embedded.i686 1:5.5.65-1.el7 base
mariadb-embedded.x86_64 1:5.5.65-1.el7 base
mariadb-embedded-devel.i686 1:5.5.65-1.el7 base
mariadb-embedded-devel.x86_64 1:5.5.65-1.el7 base
mariadb-libs.i686 1:5.5.65-1.el7 base
mariadb-server.x86_64 1:5.5.65-1.el7 base
mariadb-test.x86_64 1:5.5.65-1.el7 ba
2)安裝到上述三臺機器上
yum install mariadb.x86_64 mariadb-server.x86_64 -y
安裝MMM
1) 在所有機器上安裝epel源, 然後安裝 mmm監控和代理
yum -y install epel-release
yum -y install mysql-mmm-agent
yum -y install mysql-mmm-monitor
測試並且配置maraidb
1)預設啟用maraidb,並啟動,在mmm-maste1,mmm-master2,mmm-slave1上都要去執行。
[root@mmm-master1 ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
root@mmm-master1 ~]# systemctl start mariadb
[root@mmm-master1 ~]# mysql -uroot -p -hlocalhost
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 5.5.65-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
[root@mmm-master1 ~]# mysql -uroot -p -hlocalhost
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 5.5.65-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
2)配置所有伺服器的host檔案 ,在四臺機器上都需要配置。
[root@mmm-monitor ~]# cat <<EOF >>/etc/hosts
> 192.168.137.124 mmm-monitor
> 192.167.137.201 mmm-master1
> 192.167.137.202 mmm-master2
> 192.167.137.203 mmm-slave1
> EOF
3)
相關文章
- ceph叢集安裝報錯解決方法
- 【redis叢集安裝】Redis
- zookeeper 叢集安裝
- kafka叢集安裝Kafka
- hbase叢集安裝
- StarRocks 叢集安裝
- cdh 叢集安裝
- ElasticSearch 6.6.0叢集安裝Elasticsearch
- TiDB叢集安裝TiDB
- Elasticsearch 叢集安裝部署Elasticsearch
- 【Zookeeper】zookeeper叢集安裝
- 記HBase叢集安裝
- Hadoop叢集安裝Hadoop
- Hadoop叢集安裝配置Hadoop
- kubernetes叢集安裝
- elasticsearch叢集安裝(3臺)Elasticsearch
- Storm叢集安裝與部署ORM
- ZooKeeper叢集安裝和部署
- linux ZooKeeper叢集安裝Linux
- WAS叢集安裝配置過程
- Kubernetes 叢集安裝
- MariaDB原始碼除錯原始碼除錯
- redis cluster 4.0.9 叢集安裝搭建Redis
- WAS中介軟體垂直叢集安裝
- WAS中介軟體水平叢集安裝
- mongo副本集叢集安裝配置Go
- K8S叢集安裝K8S
- CDH5 叢集安裝教程H5
- Hadoop 叢集安裝與配置Hadoop
- hadoop叢集安裝檔案Hadoop
- Flink(四)叢集安裝(二)
- Zookeeper介紹與叢集安裝
- k8s 叢集安裝K8S
- Kafka叢集安裝Version2.10Kafka
- Redis概述和單機、叢集安裝Redis
- Hadoop叢集安裝詳細教程Hadoop
- ElasticSearch 2.3.3 叢集安裝+ Marvel + kibanaElasticsearch
- oracle雙機叢集安裝小結Oracle