Skip to content

Commit 059c132

Browse files
author
Cary Huang
committed
updated install procedure
1 parent 5c22282 commit 059c132

File tree

2 files changed

+75
-124
lines changed

2 files changed

+75
-124
lines changed

docs/en/getting-started/installation.md

Lines changed: 32 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,29 @@ The following software is required to build and run SynchDB. The versions listed
119119

120120
* libprotobuf-c v1.5.2. Refer to [here](https://github.com/protobuf-c/protobuf-c.git) to build from source.
121121

122-
### **Prepare Source (Using 16.3 as example)**
122+
**The following is required if you would like to use FDW based snapshot**
123+
124+
* OCI v23.9.0. Refer to here for more information
125+
* oracle_fdw v2.8.0. Refer to here to build from source
126+
127+
128+
### **Default SynchDB Build - Support MySQL, SQLServer and Oracle Connectors**
129+
130+
If you already have PostgreSQL installed, you can build and install Default SynchDB with PGXS. Please note that your PostgreSQL installation must have pgcrypto extension as required by SynchDB.
131+
132+
```sh
133+
USE_PGXS=1 make PG_CONFIG=$(which pg_config)
134+
USE_PGXS=1 make build_dbz PG_CONFIG=$(which pg_config)
135+
136+
sudo USE_PGXS=1 make PG_CONFIG=$(which pg_config) install
137+
sudo USE_PGXS=1 make install_dbz PG_CONFIG=$(which pg_config)
138+
```
139+
140+
### **Build SynchDB with Openlog Replicator Connector Support**
141+
142+
To build Synchdb with Openlog Replicator Connector support, an additional Synchdb Oracle Parser component must be built as well. This component is based on IvorySQL's Oracle Parser, modified to suit SynchDB and it requires PostgreSQL backend source codes to build successfully. Here's the procedure:
143+
144+
#### **Prepare Source (Using 16.3 as example)**
123145

124146
Clone the PostgreSQL source and switch to 16.3 release tag
125147
```sh linenums="1"
@@ -135,34 +157,9 @@ cd contrib/
135157
git clone https://github.com/Hornetlabs/synchdb.git
136158
```
137159

138-
### **Prepare Tools**
139-
140-
#### --> Maven
141-
``` BASH
142-
## on Ubuntu
143-
sudo apt install maven
144-
145-
## on MacOS
146-
brew install maven
147-
```
148-
149-
#### --> Java (OpenJDK)
150-
If you are working on Ubuntu 22.04.4 LTS, install the OpenJDK as below:
151-
``` BASH
152-
## on Ubuntu
153-
sudo apt install openjdk-21-jdk
154-
155-
## on MacOS
156-
brew install openjdk@22
157-
```
158-
159-
#### --> libprotobuf-c (optional)
160-
**Warning**: This library is needed if SynchDB is to be built with openlog replicator support. Refer to [here](https://github.com/protobuf-c/protobuf-c.git) to build from source.
161-
160+
#### **Build and Install PostgreSQL**
162161

163-
### **Build and Install PostgreSQL**
164-
165-
Follow the official PostgreSQL documentation [here](https://www.postgresql.org/docs/current/install-make.html) to build and install PostgreSQL from source. Generally, the procedure consists of:
162+
This can be done by following the standard build and install procedure as described [here](https://www.postgresql.org/docs/current/install-make.html)
166163

167164
**Warning**: SynchDB depends on pgcrypto to encrypt and decrypt sensitive access information. Please ensure PostgreSQL is built with SSL support.
168165

@@ -173,56 +170,30 @@ make
173170
sudo make install
174171
```
175172

176-
You should build and install the default extensions as well:
173+
Build the required pgcrypto extension
177174
```sh linenums="1"
178-
cd /home/$USER/postgres/contrib
175+
cd /home/$USER/postgres/contrib/pgcrypto
179176
make
180177
sudo make install
181178
```
182179

183-
### Build SynchDB Main Components
184-
185-
#### --> Build Debezium Runner Engine
186-
The commands below build and install the Debezium Runner Engine jar file to your PostgreSQL's lib folder.
180+
#### Build SynchDB with Additional Openlog Replicator Connector Support
187181

188-
``` BASH
182+
```sh linenums="1"
183+
# build and install debezium runner
189184
cd /home/$USER/postgres/contrib/synchdb
190185
make build_dbz
191186
sudo make install_dbz
192-
```
193187

194-
#### --> Build Oracle Parser (optional)
195-
This Oracle parser (a shared library) is a modified and isoalted version of IvorySQL's Oracle parser required by openlog replicator to process incoming Oracle DDL statements. The commands below install Oracle Parser to your PostgreSQL's lib folder.
196-
197-
**Warning**: Required if SynchDB is built with openlog replicator support.
198-
199-
```BASH
200-
cd /home/$USER/postgres/contrib/synchdb
201-
make clean_oracle_parser
188+
# build and install oracle parser
202189
make oracle_parser
203190
sudo make install_oracle_parser
204-
```
205-
206-
#### --> Build SynchDB
207-
The commands below build and install SynchDB extension to your PostgreSQL's lib and share folder.
208191

209-
``` BASH
210-
cd /home/$USER/postgres/contrib/synchdb
211-
make
212-
sudo make install
213-
```
214-
215-
SynchDB can be built with additional Openlog Replicator Connector support
216-
217-
```BASH
218-
cd /home/$USER/postgres/contrib/synchdb
219-
make WITH_OLR=1 clean
192+
# build and install synchdb
220193
make WITH_OLR=1
221194
sudo make WITH_OLR=1 install
222195
```
223196

224-
**Warning**: Openlog Replicator Connector support requires both `libprotobuf-c` and `oracle parser`.
225-
226197
### Configure your Linker to find Java (Ubuntu)
227198
Lastly, we also need to tell your system's linker where the newly added Java library (libjvm.so) is located in your system.
228199

docs/zh/getting-started/installation.md

Lines changed: 43 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -121,51 +121,54 @@ sudo ldconfig
121121

122122
* libprotobuf-c v1.5.2。请参阅[此处](https://github.com/protobuf-c/protobuf-c.git) 从源代码构建。
123123

124-
### **准备源代码(以16.3为例)**
124+
**如果您想使用基於 FDW 的快照,則需要以下內容:**
125+
126+
* OCI v23.9.0。更多資訊請參閱[此處](https://docs.synchdb.com/user-guide/configure_snapshot_engine/)
127+
* oracle_fdw v2.8.0。如何從原始碼建置?請參閱[此處](https://github.com/laurenz/oracle_fdw)
128+
129+
### **預設 SynchDB 建置 - 支援 MySQL、SQL Server 和 Oracle 連接器**
130+
131+
如果您已安裝 PostgreSQL,則可以使用 PGXS 建置並安裝預設 SynchDB。請注意,您的 PostgreSQL 安裝必須包含 SynchDB 所需的 pgcrypto 插件。
132+
133+
```sh
134+
USE_PGXS=1 make PG_CONFIG=$(which pg_config)
135+
USE_PGXS=1 make build_dbz PG_CONFIG=$(which pg_config)
136+
137+
sudo USE_PGXS=1 make PG_CONFIG=$(which pg_config) install
138+
sudo USE_PGXS=1 make install_dbz PG_CONFIG=$(which pg_config)
139+
140+
```
141+
142+
### **建構支援 Openlog Replicator 連接器的 SynchDB**
143+
144+
要建置支援 Openlog Replicator 連接器的 SynchDB,還需要建置一個額外的 SynchDB Oracle 解析器元件。此元件基於 IvorySQL 的 Oracle 解析器,並針對 SynchDB 進行了修改,需要 PostgreSQL 後端原始程式碼才能成功建置。以下是具體步驟:
145+
146+
#### **准备源代码(以16.3为例)**
147+
148+
複製 PostgreSQL 原始碼並切換到 16.3 版本標籤
125149

126-
克隆PostgreSQL源代码并切换到16.3发布标签
127150
```sh linenums="1"
128151
git clone https://github.com/postgres/postgres.git
129152
cd postgres
130153
git checkout REL_16_3
131-
```
132154

133-
在扩展文件夹中克隆SynchDB源代码
134-
注意:目前使用*(synchdb-devel)[https://github.com/Hornetlabs/synchdb/tree/synchdb-devel]*分支进行开发。
135-
```sh linenums="1"
136-
cd contrib/
137-
git clone https://github.com/Hornetlabs/synchdb.git
138155
```
139156

140-
### **准备工具**
157+
從擴充資料夾內克隆 SynchDB 原始碼
141158

142-
#### --> Maven
143-
``` BASH
144-
## 在 Ubuntu 上
145-
sudo apt install maven
159+
注意:目前使用分支 *(synchdb-devel)[https://github.com/Hornetlabs/synchdb/tree/synchdb-devel]* 進行開發。
146160

147-
## 在 MacOS 上
148-
brew install maven
149-
```
150-
151-
#### --> Java (OpenJDK)
152-
如果您使用的是 Ubuntu 22.04.4 LTS,请按如下方式安装 OpenJDK:
153-
``` BASH
154-
## 在 Ubuntu 上
155-
sudo apt install openjdk-21-jdk
161+
```sh linenums="1"
162+
cd contrib/
163+
git clone https://github.com/Hornetlabs/synchdb.git
156164

157-
## 在 MacOS 上
158-
brew install openjdk@22
159165
```
160166

161-
#### --> libprotobuf-c(可选)
162-
**警告**:如果要构建 SynchDB 并支持 openlog replicator,则需要此库。请参阅[此处](https://github.com/protobuf-c/protobuf-c.git) 从源代码构建。
167+
#### **编译和安装PostgreSQL**
163168

164-
### **编译和安装PostgreSQL**
169+
您可以按照[此處](https://www.postgresql.org/docs/current/install-make.html)中所述的標準建置和安裝流程完成此操作。
165170

166-
按照PostgreSQL官方文档[这里](https://www.postgresql.org/docs/current/install-make.html)从源代码编译和安装PostgreSQL。通常,步骤包括:
167-
168-
**警告**:SynchDB 依赖 pgcrypto 来加密和解密敏感访问信息。请确保 PostgreSQL 支持 SSL。
171+
**警告**:SynchDB 依賴 pgcrypto 來加密和解密敏感的存取資訊。請確保 PostgreSQL 已建置並啟用 SSL 支援。
169172

170173
```sh linenums="1"
171174
cd /home/$USER/postgres
@@ -174,55 +177,32 @@ make
174177
sudo make install
175178
```
176179

177-
您还应该编译和安装默认扩展:
180+
建置所需的 pgcrypto 擴展
181+
178182
```sh linenums="1"
179-
cd /home/$USER/postgres/contrib
183+
cd /home/$USER/postgres/contrib/pgcrypto
180184
make
181185
sudo make install
182-
```
183186

184-
### 构建 SynchDB 主要组件
187+
```
185188

186-
#### --> 构建 Debezium Runner Engine
187-
以下命令将构建 Debezium Runner Engine jar 文件并将其安装到 PostgreSQL 的 lib 文件夹中。
189+
#### 建置 SynchDB 並新增 Openlog Replicator 連接器支持
188190

189-
``` BASH
191+
```sh linenums="1"
192+
# 建置並安裝 debezium runner
190193
cd /home/$USER/postgres/contrib/synchdb
191194
make build_dbz
192195
sudo make install_dbz
193-
```
194-
195-
#### --> 构建 Oracle 解析器(可选)
196-
此 Oracle 解析器(一个共享库)是 IvorySQL Oracle 解析器的修改版和独立版本,Openlog 复制器需要它来处理传入的 Oracle DDL 语句。以下命令将 Oracle 解析器安装到 PostgreSQL 的 lib 文件夹中。
197-
198-
**警告**:如果 SynchDB 构建时支持 Openlog 复制器,则需要此解析器。
199196

200-
```BASH
201-
cd /home/$USER/postgres/contrib/synchdb
202-
make clean_oracle_parser
197+
# 建置並安裝 Oracle 解析器
203198
make oracle_parser
204199
sudo make install_oracle_parser
205-
```
206200

207-
#### --> 构建 SynchDB
208-
以下命令将构建 SynchDB 扩展并将其安装到 PostgreSQL 的 lib 和共享文件夹中。
209-
210-
``` BASH
211-
cd /home/$USER/postgres/contrib/synchdb
212-
make
213-
sudo make install
214-
```
215-
216-
SynchDB 可以在构建时添加额外的 Openlog Replicator Connector 支持。
217-
218-
```BASH
219-
cd /home/$USER/postgres/contrib/synchdb
220-
make WITH_OLR=1 clean
201+
# 建置並安裝 synchdb
221202
make WITH_OLR=1
222203
sudo make WITH_OLR=1 install
223-
```
224204

225-
**警告**:Openlog Replicator Connector 支持需要“libprotobuf-c”和“oracle parser”。
205+
```
226206

227207
### 配置 Linker 以访问 Java(Ubuntu)
228208
最后,我们还需要告诉系统的 Linker 新添加的 Java 库 (libjvm.so) 在系统中的位置。

0 commit comments

Comments
 (0)