复古 护眼 海天 深邃 暗黑 默认
Logo
安装集群

安装集群 #

前提条件

主控机和部署机需要通过 sshpass 进行 SSH 账号密码登录互信授权。

环境准备

执行 spex cluster download 命令下载所有安装包,包括:

  • ZooKeeper

  • ShardingSphere-Proxy

  • MySQL Driver

操作步骤

1.集群拓扑文件初始化,具体操作请参见“集群拓扑文件初始化”。

2.检查集群拓扑文件,具体操作请参见“检查集群拓扑文件”。

3.添加集群拓扑文件,具体操作请参见“添加集群拓扑信息”。

4.使用命令 spex cluster install --name <cluster-name> 安装集群。 示例: 安装已添加的名为 demo 的集群。

[root@centos71 demo]# spex cluster install --name demo
Operation ShardingSphere-Proxy
check proxy install dir exist!      
Completed......
Operation ShardingSphere-Proxy
create install directory      
10.0.1.1 : 3307 => success
install proxy      
10.0.1.1 : 3307 => success
copying shell file      
10.0.1.1 : 3307 => success
copying config file      
10.0.1.1 : 3307 => success
copying agent config file      
skipped host : 10.0.1.1 item : None
copying depend file      
10.0.1.1 : 3307 => success
Completed......
Operation ZooKeeper
check ZooKeeper install dir exist!      
Completed......
Operation ZooKeeper
create ZooKeeper install directory      
10.0.1.1 : 2181 => success
create ZooKeeper data directory      
10.0.1.1 : 2181 => success
install ZooKeeper      
10.0.1.1 : 2181 => success
copy ZooKeeper config file      
10.0.1.1 : 2181 => success
create myid      
10.0.1.1 : 2181 => success
Completed......

说明: 集群配置文件更新后,必须执行 spex config add 将新的集群拓扑配置文件信息更新到 SphereEx-Boot ,才能继续安装。