TIDB DM資料同步工具安裝部署
1.安裝tiup工具
[root@mdb01 ~]# curl --proto '=https' --tlsv1.2 -sSf | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6895k 100 6895k 0 0 3285k 0 0:00:02 0:00:02 --:--:-- 3286k
WARN: adding root certificate via internet:
You can revoke this by remove /root/.tiup/bin/7b8e153f2e2d0928.root.json
Set mirror to success
Detected shell: bash
Shell profile: /root/.bash_profile
/root/.bash_profile has been modified to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
Have a try: tiup playground
===============================================
[root@mdb01 ~]# source /root/.bash_profile
[root@mdb01 ~]# which tiup
/root/.tiup/bin/tiup
2.安裝DM元件
[root@mdb01 ~]# tiup install dm
download /dm-v1.4.4-linux-amd64.tar.gz 7.75 MiB / 7.75 MiB 100.00% 13.47 MiB p/s
3.更新 TiUP DM 元件至最新版本
[root@mdb01 ~]# tiup update --self && tiup update dm
download /tiup-v1.4.4-linux-amd64.tar.gz 6.73 MiB / 6.73 MiB 100.00% 4.45 MiB p/s
Updated successfully!
component dm version v1.4.4 is already installed
Updated successfully!
4.生成模板檔案
[root@mdb01 dm]# tiup dm template> topology.yaml
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm template
[root@mdb01 dm]# more topology.yaml
# The topology template is used deploy a minimal DM cluster, which suitable
# for scenarios with only three machinescontains. The minimal cluster contains
# - 3 master nodes
# - 3 worker nodes
# You can change the hosts according your environment
---
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/u01/dm/deploy"
data_dir: "/u01/dm/data"
# arch: "amd64"
master_servers:
- host: 192.168.61.16
worker_servers:
- host: 192.168.61.16
monitoring_servers:
- host: 192.168.61.16
grafana_servers:
- host: 192.168.61.16
alertmanager_servers:
- host: 192.168.61.16
5.執行部署
[root@mdb01 dm]# tiup dm deploy dm-test v2.0.3 /u01/dm/topology.yaml --user root -p
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm deploy dm-test v2.0.3 /u01/dm/topology.yaml --user root -p
Please confirm your topology:
Cluster type: dm
Cluster name: dm-test
Cluster version: v2.0.3
Role Host Ports OS/Arch Directories
---- ---- ----- ------- -----------
dm-master 192.168.61.16 8261/8291 linux/x86_64 /u01/dm/deploy/dm-master-8261,/u01/dm/data/dm-master-8261
dm-worker 192.168.61.16 8262 linux/x86_64 /u01/dm/deploy/dm-worker-8262,/u01/dm/data/dm-worker-8262
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y
Input SSH password:
+ Generate SSH keys ... Done
+ Download TiDB components
- Download dm-master:v2.0.3 (linux/amd64) ... Done
- Download dm-worker:v2.0.3 (linux/amd64) ... Done
+ Initialize target host environments
- Prepare 192.168.61.16:22 ... Done
+ Copy files
- Copy dm-master -> 192.168.61.16 ... Done
- Copy dm-worker -> 192.168.61.16 ... Done
Enabling component dm-master
Enabling instance dm-master 192.168.61.16:8261
Enable dm-master 192.168.61.16:8261 success
Enabling component dm-worker
Enabling instance dm-worker 192.168.61.16:8262
Enable dm-worker 192.168.61.16:8262 success
Cluster `dm-test` deployed successfully, you can start it with command: `tiup dm start dm-test`
[root@mdb01 dm]# tiup dm list
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm list
Name User Version Path PrivateKey
---- ---- ------- ---- ----------
dm-test tidb v2.0.3 /root/.tiup/storage/dm/clusters/dm-test /root/.tiup/storage/dm/clusters/dm-test/ssh/id_rsa
[root@mdb01 dm]# tiup dm display dm-test
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm display dm-test
Cluster type: dm
Cluster name: dm-test
Cluster version: v2.0.3
SSH type: builtin
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
-- ---- ---- ----- ------- ------ -------- ----------
192.168.61.16:8261 dm-master 192.168.61.16 8261/8291 linux/x86_64 Down /u01/dm/data/dm-master-8261 /u01/dm/deploy/dm-master-8261
192.168.61.16:8262 dm-worker 192.168.61.16 8262 linux/x86_64 N/A /u01/dm/data/dm-worker-8262 /u01/dm/deploy/dm-worker-8262
Total nodes: 2
6.啟動叢集
[root@mdb01 dm]# tiup dm start dm-test
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm start dm-test
Starting cluster dm-test...
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/dm/clusters/dm-test/ssh/id_rsa, publicKey=/root/.tiup/storage/dm/clusters/dm-test/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=192.168.61.16
+ [Parallel] - UserSSH: user=tidb, host=192.168.61.16
+ [ Serial ] - StartCluster
Starting component dm-master
Starting instance dm-master 192.168.61.16:8261
Start dm-master 192.168.61.16:8261 success
Starting component dm-worker
Starting instance dm-worker 192.168.61.16:8262
Start dm-worker 192.168.61.16:8262 success
Started cluster `dm-test` successfully
[root@mdb01 dm]# tiup dm display dm-test
Starting component `dm`: /root/.tiup/components/dm/v1.4.4/tiup-dm display dm-test
Cluster type: dm
Cluster name: dm-test
Cluster version: v2.0.3
SSH type: builtin
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
-- ---- ---- ----- ------- ------ -------- ----------
192.168.61.16:8261 dm-master 192.168.61.16 8261/8291 linux/x86_64 Healthy|L /u01/dm/data/dm-master-8261 /u01/dm/deploy/dm-master-8261
192.168.61.16:8262 dm-worker 192.168.61.16 8262 linux/x86_64 Free /u01/dm/data/dm-worker-8262 /u01/dm/deploy/dm-worker-8262
Total nodes: 2
7.安裝dmctl工具
[root@mdb01 dm]# tiup dmctl --h
The component `dmctl` version is not installed; downloading from repository.
download /dmctl-v2.0.3-linux-amd64.tar.gz 26.48 MiB / 26.48 MiB 100.00% 10.49 MiB p/s
Starting component `dmctl`: /root/.tiup/components/dmctl/v2.0.3/dmctl/dmctl --h
Usage: dmctl [global options] command [command options] [arguments...]
Available Commands:
check-task check-task <config-file> [--error count] [--warn count]
get-config get-config <task | master | worker | source> <name> [--file filename]
handle-error handle-error <task-name | task-file> [-s source ...] [-b binlog-pos] <skip/replace/revert> [replace-sql1;replace-sql2;]
list-member list-member [--leader] [--master] [--worker] [--name master-name/worker-name ...]
offline-member offline-member <--master/--worker> <--name master-name/worker-name>
operate-leader operate-leader <operate-type>
operate-schema operate-schema <operate-type> <-s source ...> <task-name | task-file> <-d database> <-t table> [schema-file] [--flush] [--sync]
operate-source operate-source <operate-type> [config-file ...] [--print-sample-config]
pause-relay pause-relay <-s source ...>
pause-task pause-task [-s source ...] <task-name | task-file>
purge-relay purge-relay <-s source> <-f filename> [--sub-dir directory]
query-status query-status [-s source ...] [task-name | task-file] [--more]
resume-relay resume-relay <-s source ...>
resume-task resume-task [-s source ...] <task-name | task-file>
show-ddl-locks show-ddl-locks [-s source ...] [task-name | task-file]
start-relay start-relay <-s source-id> <worker-name> [...worker-name]
start-task start-task [-s source ...] [--remove-meta] <config-file>
stop-relay stop-relay <-s source-id> <worker-name> [...worker-name]
stop-task stop-task [-s source ...] <task-name | task-file>
transfer-source transfer-source <source-id> <worker-id>
unlock-ddl-lock unlock-ddl-lock <lock-ID>
Special Commands:
--encrypt Encrypts plaintext to ciphertext.
--decrypt Decrypts ciphertext to plaintext.
Global Options:
--V Prints version and exit.
--config Path to config file.
--master-addr Master API server address, this parameter is required when interacting with the dm-master
--rpc-timeout RPC timeout, default is 10m.
--ssl-ca Path of file that contains list of trusted SSL CAs for connection.
--ssl-cert Path of file that contains X509 certificate in PEM format for connection.
--ssl-key Path of file that contains X509 key in PEM format for connection.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31480688/viewspace-2775683/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- TIDB DM資料同步step by stepTiDB
- 使用 Ansible 安裝部署 TiDBTiDB
- tidb之dm叢集同步異常處理TiDB
- TiDB資料庫PD混合部署TiDB資料庫
- Hbase資料庫安裝部署資料庫
- DM 是如何處理 DML 的丨TiDB 工具分享TiDB
- 【達夢】Docker安裝達夢資料庫 dm8Docker資料庫
- G010-DM-INS-02 達夢資料庫 DM 8 命令列安裝資料庫命令列
- G002-DM-INS-01 達夢資料庫 DM 8 圖形化安裝資料庫
- TiDB DM同步報錯ErrCode 44006處理一例TiDB
- 安裝和使用 otter (資料同步利器)
- 達夢資料庫(DM8)大規模並行叢集MPP 2節點安裝部署資料庫並行
- 多種方式告訴你如何計算DM同步資料到TiDB的延時時間TiDB
- DM 中 relay log 效能優化實踐丨TiDB 工具分享優化TiDB
- Oracle Linux 7.1中安裝達夢資料庫DM7OracleLinux資料庫
- 圖資料庫 Nebula Graph 的安裝部署資料庫
- 國產化之銀河麒麟安裝達夢資料庫DM8資料庫
- 單機CentOS 安裝 TiDBCentOSTiDB
- DM7 使用dminit工具建立資料庫資料庫
- DM7使用dmrestore工具還原資料庫REST資料庫
- Microsoft Office 自定義安裝部署工具 | MocreakROS
- 【Hadoop】大資料安裝部署之虛擬機器的安裝Hadoop大資料虛擬機
- TiDB 作為 MySQL Slave 實現實時資料同步TiDBMySql
- DM7使用DMASM安裝DMRACASM
- 安裝NGrabLite 錄影DM500
- canal+mysql+kafka實時資料同步安裝、配置MySqlKafka
- tidb dm叢集修改某個dm-worker的儲存目錄TiDB
- 持續整合工具之Jenkins安裝部署Jenkins
- 達夢資料庫DM8在LINUX環境下安裝步驟資料庫Linux
- DM 分庫分表 DDL “樂觀協調” 模式介紹丨TiDB 工具分享模式TiDB
- DM 分庫分表 DDL “悲觀協調” 模式介紹丨TiDB 工具分享模式TiDB
- 資料整合實現以及平臺安裝部署入門
- Sync Folders Pro for Mac資料夾資料同步工具Mac
- Sync Folders Pro for Mac 資料夾資料同步工具Mac
- Sync Folders Pro for mac - 資料夾資料同步工具Mac
- 有方法能夠把手機安裝的 app 的資料同步到電腦上的工具嗎APP
- 資料同步工具Sqoop和DataXOOP
- rsync資料同步工具應用指南