安装
=环境检查=
将语言环境设置为en_US和UTf-8
localedef -i en_US -f UTF-8 en_US.UTF-8
在pm1上生成ssh-key,并配置机器间ssh-key连接
[root @ pm- 1~] $ ssh-keygen
[root @ pm- 1~] $ ssh-copy-id -i~ / .ssh / id_rsa.pub 192.168.110.134
[root @ pm- 1~] $ ssh-copy-id -i~ / .ssh / id_rsa.pub 192.168.110.135
如果修改了默认的ssh端口,注意修改ssh客户端的端口适配
vim /etc/ssh/ssh_config
=依赖包安装=
在所有的机器上安装依赖包
yum -y groupinstall "Development Tools"
yum -y install gcc gcc-c++ cmake libevent-devel pcre-devel zlib-devel gd-devel curl-devel libtool ncurses-devel libxml2-devel openssl-devel libicu-devel
yum -y install expect perl perl-DBI openssl zlib file sudo libaio rsync snappy net-tools numactl-libs nmap jemalloc
=下载安装=
centos 7,用yum 安装boost
yum -y install boost
centos 6 安装,需要自行安装boost
下载boost编译安装
wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz
tar zxvf boost_1_55_0.tar.gz
cd boost_1_55_0
./bootstrap.sh --with-libraries=atomic,date_time,exception,filesystem,iostreams,locale,program_options,regex,signals,system,test,thread,timer,log --prefix=/usr
./b2 install
ldconfig
下载ColumnStore编译安装,注意一定要放在/root目录下
wget https://downloads.mariadb.com/ColumnStore/1.1.5/centos/x86_64/6/mariadb-columnstore-1.1.5-1-centos6.x86_64.rpm.tar.gz
tar -xzf mariadb-columnstore-1.1.5-1-centos6.x86_64.rpm.tar.gz
rpm -ivh mariadb-columnstore-1.1.5-1-x86_64-centos6-*
centos 7
wget https://downloads.mariadb.com/ColumnStore/1.2.5/centos/x86_64/7/mariadb-columnstore-1.2.5-1-centos7.x86_64.rpm.tar.gz
tar -xzf mariadb-columnstore-1.2.5-1-centos7.x86_64.rpm.tar.gz
rpm -ivh mariadb-columnstore-1.2.5-1-x86_64-centos7-*
运行安装配置
/usr/local/mariadb/columnstore/bin/postConfigure
Select the type of System Server install [1=single, 2=multi] (2) > 2
Select the type of System Module Install [1=separate, 2=combined] (2) > 2
MariaDB ColumnStore Schema Sync feature, do you want to enable? [y,n] (y) > y
Enter System Name (columnstore-1) > tongji
Select the type of Data Storage [1=internal, 2=external] (1) > 1
Enter number of Performance Modules [1,1024] (1) > 2
Enter Nic Interface #1 Host Name (localhost.localdomain) > pm1
Enter Nic Interface #1 IP Address of pm1 (0.0.0.0) > 192.168.112.134
Enter Nic Interface #2 Host Name (unassigned) > 回车
Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of DBRoot IDs assigned to module 'pm1' (1) > 1
Enter Nic Interface #1 Host Name (unassigned) > pm2
Enter Nic Interface #1 IP Address of pm2 (0.0.0.0) > 192.168.112.135
Enter Nic Interface #2 Host Name (unassigned) > 回车
Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of DBRoot IDs assigned to module 'pm2' () > 2
Enter password, hit 'enter' to default to using a ssh key, or 'exit' > 回车
等待安装完成
如果看到下信息为正常
[root@localhost ~]# mcsadmin
mcsadmin> getsysteminfo
getsysteminfo Mon Jun 17 17:11:47 2019
System columnstore-1
System and Module statuses
Component Status Last Status Change
------------ -------------------------- ------------------------
System ACTIVE Fri Jun 14 20:33:31 2019
Module pm1 ACTIVE Fri Jun 14 17:58:25 2019
Module pm2 ACTIVE Fri Jun 14 20:15:46 2019
Active Parent OAM Performance Module is 'pm1'
Primary Front-End MariaDB ColumnStore Module is 'pm1'
MariaDB ColumnStore Process statuses
Process Module Status Last Status Change Process ID
------------------ ------ --------------- ------------------------ ----------
ProcessMonitor pm1 ACTIVE Fri Jun 14 17:56:50 2019 2660
ProcessManager pm1 ACTIVE Fri Jun 14 17:56:57 2019 2780
DBRMControllerNode pm1 ACTIVE Fri Jun 14 20:14:56 2019 78340
ServerMonitor pm1 ACTIVE Fri Jun 14 17:57:54 2019 4114
DBRMWorkerNode pm1 ACTIVE Fri Jun 14 20:14:58 2019 78421
DecomSvr pm1 ACTIVE Fri Jun 14 17:57:54 2019 4243
PrimProc pm1 ACTIVE Fri Jun 14 20:15:12 2019 78830
ExeMgr pm1 ACTIVE Fri Jun 14 20:15:25 2019 79235
WriteEngineServer pm1 ACTIVE Fri Jun 14 20:15:45 2019 80162
DDLProc pm1 ACTIVE Fri Jun 14 20:16:00 2019 80642
DMLProc pm1 ACTIVE Fri Jun 14 20:16:07 2019 80853
mysqld pm1 ACTIVE Fri Jun 14 20:15:40 2019 79964
ProcessMonitor pm2 ACTIVE Fri Jun 14 17:57:39 2019 2607
ProcessManager pm2 HOT_STANDBY Fri Jun 14 17:57:46 2019 2726
DBRMControllerNode pm2 COLD_STANDBY Fri Jun 14 20:14:54 2019
ServerMonitor pm2 ACTIVE Fri Jun 14 17:57:58 2019 3048
DBRMWorkerNode pm2 ACTIVE Fri Jun 14 20:15:03 2019 45373
DecomSvr pm2 ACTIVE Fri Jun 14 17:57:58 2019 3093
PrimProc pm2 ACTIVE Fri Jun 14 20:15:16 2019 45447
ExeMgr pm2 ACTIVE Fri Jun 14 20:15:30 2019 45563
WriteEngineServer pm2 ACTIVE Fri Jun 14 20:15:49 2019 45985
DDLProc pm2 COLD_STANDBY Fri Jun 14 17:58:13 2019
DMLProc pm2 COLD_STANDBY Fri Jun 14 17:58:13 2019
mysqld pm2 ACTIVE Fri Jun 14 20:15:46 2019 45914
Active Alarm Counts: Critical = 2, Major = 0, Minor = 0, Warning = 0, Info = 0
添加模块
=注意事项=
1 确保您具有将要添加所有服务器的用户密码或ssh-key(配置为SSH-KEY认证)
2 已安装所有依赖包
3 服务器具有与当前服务器相同的操作系统和时区
4 在成功添加模块或DBRoot之前,所有数据库更新命令(如DDL/DML和cpimports)都将暂停
=添加性能模块(PM)=
进入控制台
[root@lo31 ~]# mcsadmin
在mcsadmin控制台查看系统目前的状态
mcsadmin> getsysteminfo
添加达到要求的服务器为性能模块
mcsadmin> addModule pm 1 192.168.10.210
提示输入密码为SSH(配置好SSH-KEY认证时)
Enter the 'User' Password or 'ssh' if configured with ssh-keys
Please enter: ssh
等待完成
启用PM3模块
mcsadmin> alterSystem-EnableModule pm3
= 分配DBROOTS给性能模块(PM)=
创建1个DBROOTS(文件系统)
mcsadmin
mcsadmin> adddbroot 1
查看现在的DBROOTS状态
mcsadmin> getstorageconfig
:
System Assigned DBRoot Count = 2
DBRoot IDs assigned to 'pm1' = 1
DBRoot IDs assigned to 'pm2' = 2
DBRoot IDs assigned to 'pm3' =
DBRoot IDs unassigned = 3
:
分配DBROOTS到PM模块上
mcsadmin> assignDbrootPmConfig 3 pm3
分配完成之后,查看状态
mcsadmin> getstorageconfig
:
System Assigned DBRoot Count = 3
DBRoot IDs assigned to 'pm1' = 1
DBRoot IDs assigned to 'pm2' = 2
DBRoot IDs assigned to 'pm3' = 3
:
确认无误之后,运行启动系统
mcsadmin> startsystem