From 92934079cbfe778015de271e669891a27829515d Mon Sep 17 00:00:00 2001 From: bartdong Date: Mon, 18 Sep 2023 15:23:41 +0800 Subject: [PATCH] modify --- docs/guide/01-quickstart.en.md | 18 +++++++++++------- docs/guide/01-quickstart.md | 22 +++++++++++++--------- docs/guide/pgxc_ctl_double.conf | 3 ++- docs/guide/pgxc_ctl_single.conf | 3 ++- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/docs/guide/01-quickstart.en.md b/docs/guide/01-quickstart.en.md index 9f05ab3..e25edf9 100644 --- a/docs/guide/01-quickstart.en.md +++ b/docs/guide/01-quickstart.en.md @@ -36,11 +36,11 @@ OS: TencentOS 2, TencentOS 3, OpenCloudOS, CentOS 7, CentOS 8, Ubuntu ### Dependence -` yum -y install gcc make readline-devel zlib-devel openssl-devel uuid-devel bison flex` +` yum -y install gcc make readline-devel zlib-devel openssl-devel uuid-devel bison flex git` or -` apt install -y gcc make libreadline-dev zlib1g-dev libssl-dev libossp-uuid-dev bison flex` +` apt install -y gcc make libreadline-dev zlib1g-dev libssl-dev libossp-uuid-dev bison flex git` - **create user** @@ -160,6 +160,10 @@ We can also download and rename it to ```pgxc_ctl.conf``` and configure it accor ```shell #!/bin/bash +# Double Node Config + +IP_1=10.215.147.158 +IP_2=10.240.138.159 pgxcInstallDir=/data/opentenbase/install/opentenbase_bin_v2.0 pgxcOwner=opentenbase @@ -175,13 +179,13 @@ configBackupFile=pgxc_ctl.bak #---- GTM ---------- gtmName=gtm -gtmMasterServer=10.215.147.158 +gtmMasterServer=$IP_1 gtmMasterPort=50001 gtmMasterDir=/data/opentenbase/data/gtm gtmExtraConfig=none gtmMasterSpecificExtraConfig=none gtmSlave=y -gtmSlaveServer=10.240.138.159 +gtmSlaveServer=$IP_2 gtmSlavePort=50001 gtmSlaveDir=/data/opentenbase/data/gtm gtmSlaveSpecificExtraConfig=none @@ -194,7 +198,7 @@ coordNames=(cn001 cn002 ) coordPorts=(30004 30004 ) poolerPorts=(31110 31110 ) coordPgHbaEntries=(0.0.0.0/0) -coordMasterServers=(10.215.147.158 10.240.138.159) +coordMasterServers=($IP_1 $IP_2) coordMasterDirs=($coordMasterDir $coordMasterDir) coordMaxWALsernder=2 coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder ) @@ -265,13 +269,13 @@ datanodeNames=(dn001 dn002) datanodePorts=(40004 40004) datanodePoolerPorts=(41110 41110) datanodePgHbaEntries=(0.0.0.0/0) -datanodeMasterServers=(10.215.147.158 10.240.138.159) +datanodeMasterServers=($IP_1 $IP_2) datanodeMasterDirs=($dn1MstrDir $dn2MstrDir) dnWALSndr=4 datanodeMaxWALSenders=($dnWALSndr $dnWALSndr) datanodeSlave=y -datanodeSlaveServers=(10.240.138.159 10.215.147.158) +datanodeSlaveServers=($IP_2 $IP_1) datanodeSlavePorts=(50004 54004) datanodeSlavePoolerPorts=(51110 51110) datanodeSlaveSync=n diff --git a/docs/guide/01-quickstart.md b/docs/guide/01-quickstart.md index 59fcb7c..ebc4e25 100644 --- a/docs/guide/01-quickstart.md +++ b/docs/guide/01-quickstart.md @@ -34,11 +34,11 @@ OS: TencentOS 2, TencentOS 3, OpenCloudOS, CentOS 7, CentOS 8, Ubuntu ### 安装依赖 -` yum -y install gcc make readline-devel zlib-devel openssl-devel uuid-devel bison flex` +` yum -y install gcc make readline-devel zlib-devel openssl-devel uuid-devel bison flex git` 或 -` apt install -y gcc make libreadline-dev zlib1g-dev libssl-dev libossp-uuid-dev bison flex` +` apt install -y gcc make libreadline-dev zlib1g-dev libssl-dev libossp-uuid-dev bison flex git` - **创建opentenbase用户** @@ -156,8 +156,12 @@ export LC_ALL=C [点击此处下载单节点配置](./pgxc_ctl_single.conf) -``` yaml +``` shell #!/bin/bash +# Double Node Config + +IP_1=10.215.147.158 +IP_2=10.240.138.159 pgxcInstallDir=/data/opentenbase/install/opentenbase_bin_v2.0 pgxcOwner=opentenbase @@ -173,13 +177,13 @@ configBackupFile=pgxc_ctl.bak #---- GTM ---------- gtmName=gtm -gtmMasterServer=10.215.147.158 +gtmMasterServer=$IP_1 gtmMasterPort=50001 gtmMasterDir=/data/opentenbase/data/gtm gtmExtraConfig=none gtmMasterSpecificExtraConfig=none gtmSlave=y -gtmSlaveServer=10.240.138.159 +gtmSlaveServer=$IP_2 gtmSlavePort=50001 gtmSlaveDir=/data/opentenbase/data/gtm gtmSlaveSpecificExtraConfig=none @@ -192,7 +196,7 @@ coordNames=(cn001 cn002 ) coordPorts=(30004 30004 ) poolerPorts=(31110 31110 ) coordPgHbaEntries=(0.0.0.0/0) -coordMasterServers=(10.215.147.158 10.240.138.159) +coordMasterServers=($IP_1 $IP_2) coordMasterDirs=($coordMasterDir $coordMasterDir) coordMaxWALsernder=2 coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder ) @@ -247,7 +251,7 @@ EOF coordSpecificExtraPgHba=(none none) -coordAdditionalSlaves=n +coordAdditionalSlaves=n cad1_Sync=n #---- Datanodes --------------------- @@ -263,13 +267,13 @@ datanodeNames=(dn001 dn002) datanodePorts=(40004 40004) datanodePoolerPorts=(41110 41110) datanodePgHbaEntries=(0.0.0.0/0) -datanodeMasterServers=(10.215.147.158 10.240.138.159) +datanodeMasterServers=($IP_1 $IP_2) datanodeMasterDirs=($dn1MstrDir $dn2MstrDir) dnWALSndr=4 datanodeMaxWALSenders=($dnWALSndr $dnWALSndr) datanodeSlave=y -datanodeSlaveServers=(10.240.138.159 10.215.147.158) +datanodeSlaveServers=($IP_2 $IP_1) datanodeSlavePorts=(50004 54004) datanodeSlavePoolerPorts=(51110 51110) datanodeSlaveSync=n diff --git a/docs/guide/pgxc_ctl_double.conf b/docs/guide/pgxc_ctl_double.conf index 1b0f6b6..f0dffc4 100644 --- a/docs/guide/pgxc_ctl_double.conf +++ b/docs/guide/pgxc_ctl_double.conf @@ -1,5 +1,6 @@ #!/bin/bash -# 双节点配置 +# Double Node Config + IP_1=10.215.147.158 IP_2=10.240.138.159 diff --git a/docs/guide/pgxc_ctl_single.conf b/docs/guide/pgxc_ctl_single.conf index 8d9f133..44d9e4d 100644 --- a/docs/guide/pgxc_ctl_single.conf +++ b/docs/guide/pgxc_ctl_single.conf @@ -1,5 +1,6 @@ #!/bin/bash -#单节点配置 +# Single Node Config + IP_1=10.215.147.158 IP_2=