SymmetricDS 官方DEMO解釋及部署-QUICKSTART-1
阿新 • • 發佈:2018-11-28
QuickStart Explanation-1
2.1 安裝
官方下載最新版,目前最新版2018.10.31號的3.9.15 Server
2.2 連線資料庫
每個節點就相當於一個XXX.properties的配置檔案。拿官方示例說明:
engine.name=corp-000 # The class name for the JDBC Driver db.driver=org.h2.Driver # The JDBC URL used to connect to the database db.url=jdbc:h2:corp;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000 # The user to login as who can create and update tables db.user=sa # The password for the user to login as db.password= registration.url= sync.url=http://localhost:31415/sync/corp-000 # Do not change these for running the demo group.id=corp external.id=000 # Don't muddy the waters with purge logging job.purge.period.time.ms=7200000 # This is how often the routing job will be run in milliseconds job.routing.period.time.ms=5000 # This is how often the push job will be run. job.push.period.time.ms=10000 # This is how often the pull job will be run. job.pull.period.time.ms=10000 # Kick off initial load initial.load.create.first=true
engine.name:名字可以隨意取,不做要求
group.id:組ID,根據示例理解就是STORE是一個節點組,包含STORE-001,STORE-002兩個節點,CORP也是一個節點組僅包含一個節點CORP-000
external.id: 實際上該節點的ID
sync.url: 同步資源的連結,不能為空,讓目標端節點獲取配置的地方。
registration.url:註冊資源的連結,如果是空的,代表著該節點就是源端節點,目標端的節點要配置為源端的地址。
db.driver:資料庫驅動
db.user、db.password:資料庫連線的賬號、密碼
db.url:資料庫連線串,這裡的H2配置不是很好,可以參考我的另一篇關於 H2Database的連線串的文件。
其他的配置先採用預設的。