原文github:https://github.com/mariadb-corporation/MaxScale/blob/develop/Documentation/Documentation-Contents.md

参考 github上的说明,在Ubuntu上做以下处理即可:

  1.安装相关命令:

 sudo apt-get install git build-essential libssl-dev libaio-dev ncurses-dev bison flex cmake perl libtool libcurl4-openssl-dev libpcre3-dev tcl

tcl-dev  uuid uuid-dev

  2.从GitHub上拷贝MaxScale:

 git clone https://github.com/mariadb-corporation/MaxScale

  3.创建一个build文件夹,并进入:

    mkdir build

    cd build

  4.配置构建参数【build】:
    cmake ../MaxScale -DBUILD_TESTS=Y

  5.一旦参数配置完成,就可以进行编译、测试和安装MaxScale

    make

    make test

    sudo make install

安装路径说明:

  配置模板文件和相关说明文件位于 /usr/local/share/maxscale目录下

  配置文件为:/etc/maxscale.cnf

  启动文件为:/etc/init.d/maxscale

  Log文件:/var/log/maxscale

  Cache:/var/cache/maxscale

  bin文件:/usr/local/bin/maxscale

相关参考:   http://www.yunweipai.com/archives/9148.html 

http://blog.5ibc.net/p/68683.html

使用:

在开始配置前,要在Master为MaxScale创建两个用户,用于监控模块和路由模块。

创建监控用户:scalemon   123456

创建路由用户:maxscale  123456

用户创建完成后,开始配置

vi /etc/maxscale.cnf

找到 [server1] 部分,修改其中的 address 和 port,指向 master 的 IP 和端口。

复制2次 [server1] 的整块儿内容,改为 [server2] 与 [server3],同样修改其中的 address 和 port,分别指向 slave1 和 slave2,可参考如下:

[maxscale]
threads=1
log_info=1
logdir=/var/log/maxscale/
datadir=/usr/local/var/lib/maxscale/data/
# default is true.when all slave dumped ,master is read-writeable.
detect_stale_master=false
#default is true,means master can handle read
master_accept_reads=false

[server1]
type=server
address=192.168.7.222
port=3306
protocol=MySQLBackend
[server2]
type=server
address=192.168.7.224
port=3306
protocol=MySQLBackend
[server3]
type=server
address=192.168.7.223
port=3306
protocol=MySQLBackend

[MySQL Monitor]
type=monitor
module=mysqlmon
servers=server1,server2,server3
user=scalemon
passwd=9E509EC08A55148962B5CA53A64211C1
monitor_interval=1000

[Read-Write Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
passwd=9E509EC08A55148962B5CA53A64211C1
max_slave_connections=100%

[MaxAdmin Service]
type=service
router=cli
[MaxAdmin Listener]
type=listener
service=MaxAdmin Service
protocol=maxscaled
address=localhost
port=6603

[Read-Write Listener]
type=listener
service=Read-Write Service
protocol=MySQLClient
port=4006

passwd使用的是加密

由maxkeys创建位于datadir下的.secrets文件,maxpasswd 进行加密。

如下:

会生成加密后的密码。

启动maxscale 管理器maxadmin 及进行测试,可参考上述资料。

如果有其他问题,可在此提问:

  Email: maxscale@googlegroups.com
Forum: http://groups.google.com/forum/#!forum/maxscale

Ubuntu之MaxScale安装配置的更多相关文章

  1. Ubuntu server16.04安装配置驱动418.87、cuda10.1、cudnn7.6.4.38、anaconda、pytorch超详细解决

    目录 安装GCC 安装NVIDIA驱动 1. 卸载原有驱动(没装跳过) 2. 禁用nouveau 3. 安装NVIDIA显卡驱动 安装CUDA10.1 安装cudnn 安装anaconda 安装ten ...

  2. Ubuntu下apache2安装配置(内含数字证书配置)

    Ubuntu下apache2安装配置(内含数字证书配置)安装命令:sudo apt-get updatesudo apt-get install apache2 配置1.查看apache2安装目录命令 ...

  3. Ubuntu 18.04安装配置Apache Ant

    Ubuntu 18.04安装配置Apache Ant 文章目录 Ubuntu 18.04安装配置Apache Ant 下载 执行以下命令 `/etc/profile`中配置环境变量 载入配置 测试 执 ...

  4. Ubuntu 18.04 安装配置 go 语言

    Ubuntu 18.04 安装配置 go 语言 1.下载 下载 jdk 到 Downloands 文件夹下 cd 进入 /usr/local, 创建 go 文件夹, 然后 cd 进这个文件夹 cd / ...

  5. 【转】Ubuntu 16.04安装配置TensorFlow GPU版本

    之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.0 ...

  6. 【云计算】ubuntu下docker安装配置指南

    Docker Engine安装配置 以下描述仅Docker在Ubuntu Precise 12.04 (LTS).Ubuntu Trusty 14.04 (LTS).Ubuntu Wily 15.10 ...

  7. Ubuntu 14.04 安装配置备忘录

    完全在 Linux 下工作,大概有3年时间了. 之前都是用 Windows, 而把 Linux 装在虚拟机里,现在反过来,把 Windows 装在了虚拟机里,只是因为偶尔还要用网银的缘故. 以我这几年 ...

  8. Ubuntu 15.04 安装配置Apache和mysql的方法

    前 言 上篇海面特效的博文结尾提到了SideFX开发的HQueue分布式集群,配置HQueue首先需要安装mysql,所以今天先分享一下如何在Ubuntu系统中安装mysql和Apache: Ubun ...

  9. ubuntu 及 postgredql 安装配置小坑摘录

    ubuntu 16.04.1 安装 Ubuntu Server 16.04.1安装配置图解教程,按教程修改局域网static IP 开启sftp必须 解决SSH服务拒绝密码,之后才能欢乐地使用file ...

随机推荐

  1. 常用开源镜像站整理android sdk manager

    http://www.cocoachina.com/programmer/20151023/13852.html http://android-mirror.bugly.qq.com:8080/inc ...

  2. Pythhon 字典 key in dict 比 dict.has_key (key)效率高 为什么?

    has_key是去取key对应的值,时间复杂度在最优情况下为O(1); in 是直接去dict.__contains__这个保存这key的list中去获取,相当与是去数组中获取. 所以in 比has_ ...

  3. ionic的页面直接的跳转

    $state.go页面不刷新数据 假如进入market/beian/add添加数据,保存提交后回退market/beian列表页,没有自动更新数据,必须得手动下拉刷新才会出来 $state.go(&q ...

  4. PYTHON seek()tell()语句

    print(f.tell()) # 显示当前位置 f.seek(0) #回到某一起点

  5. STM32F103ZET6 用定时器级联方式输出特定数目的PWM(转载)

    STM32F103ZET6里共有8个定时器,其中高级定时器有TIM1-TIM5.TIM8,共6个.这里需要使用定时器的级联功能,ST的RM0008 REV12的P388和P399页上有说明对于特定的定 ...

  6. Qt 官方一键动态发布技能

    苦找了好几天动态库,程序可以运行了,结果没有图标还是少了运行库很苦恼,发现Qt 官方有一键动态发布功能感觉自己萌萌的,来自qt吧亲测可用. 集成开发环境 QtCreator 目前生成图形界面程序 ex ...

  7. 转:bwa的使用方法

    bwa的使用需要两中输入文件:    Reference genome data(fasta格式 .fa, .fasta, .fna)    Short reads data (fastaq格式 .f ...

  8. C# 基于json通讯中的中文的处理

    如果通讯中产生了\\u4e00-\\u9fa5范围的中文的unicode代码,而不是\u4e00-\u9fa5范围的,那么c#的处理就比较麻烦了. 破解方法: 机制 它会把\\u4e00拆成部分来识别 ...

  9. 8.eclipse调试smali

    一.重打开包APK 1.apktool解包文件 apktool d -d XXX.apk 这里注意使用-d参数,生成的smali文件才是以java结尾的,才能被eclipse识别 2.找到Androi ...

  10. 【自动部署】Ansible 怎么通过堡垒机/跳板机 访问目标机器

    Ansible机器的 /root/.ssh/config 配置如下即可:Host 目标机器IP User root IdentityFile=/root/.ssh/xxx_id_rsa ProxyCo ...