一、环境准备
1.1 版本
proxysql 版本:1.4.15 #发布时间:2019.2.15
操作系统:CentOS 7.5
1.2 端口预分配
实例1:proxysql 6042 6043
实例2:proxysql 6052 6053
实例3:proxysql 6062 6063
注:其中60x2为管理端口,60x3为应用端口
1.2 系统配置
#关闭selinux
sed -i '/^SELINUX/s/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0
#关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
#安装依赖
yum -y install perl-DBD-MySQL
#优化限制参数
vi /etc/security/limits.conf
* hard nofile 65535
* soft nofile 10240
二、多实例安装
2.1 下载安装
#下载
wget https://github.com/sysown/proxysql/releases/download/v1.4.15/proxysql-1.4.15-1-centos7.x86_64.rpm
#安装
yum -y install proxysql-1.4.15-1-centos7.x86_64.rpm
#查看
proxysql --version #查看版本
[root@localhost opt]# rpm -ql proxysql #查看安装路径
/etc/init.d/proxysql
/etc/proxysql.cnf
/usr/bin/proxysql
/usr/share/proxysql/tools/proxysql_galera_checker.sh
/usr/share/proxysql/tools/proxysql_galera_writer.pl
2.2 修改配置文件