Since TCapture is a software for implementing data replication of Postgresql databases, begin by installing PostgreSQL.
Note
TCapture currently supports PostgreSQL versions 10.1, 10.2, 10.3, 10.4, 10.5, and 11.0 on 64-bit architectures.
Once you have PostgreSQL installed on your system, you just need to install the TCapture software and then execute the configuration scripts within your PostgreSQL database. You can download tarball package from our release archives and install them directly.
Download zip from https://github.com/lab-sb/tcrepsrv-dev
cd /var/lib/pgsql/scripts/mycode/
unzip tcrepsrv-dev-master.zip
or
git clone https://github.com/lab-sb/tcrepsrv-dev.git
as root:
cd tcrepsrv-dev directory
execute install.sh under TCapture software folder
./install.sh #cover the following steps:
- set variable RDBBDR HOME in .rdbbdr_env.sh
- soruce environment file .rdbbdr_env.sh
- installing TCapture logical decoding library under /usr/pgsql-10/lib
examples.
1- echo "export RDBBDR=/var/lib/pgsql/scripts/mycode/rdbbdr" > .rdbbdr_env.sh
2-. .rdbbdr_env.sh
3-echo $RDBBDR
4-/var/lib/pgsql/scripts/mycode/rdbbdr
5-cd $RDBBDR
6-cp ./rdbbdr/lib/rdb_decoder/rdblogdec.so /usr/pgsql-10/lib/
check out the Adding a Primary node in TCapture section. !
By default, PostgreSQL is not configured to allow incoming connections from remote hosts. To enable incoming connections, first set the following line in postgresql.conf:
listen_addresses = '*'
And in pg_hba.conf, add a line such as the following to allow incoming connections:
host all all <ip address>/<subnet> md5
For example, to allow incoming connections from any host:
host all all 0.0.0.0/0 md5
To run the PostgreSQL server in the background, use the pg_ctl driver and point it to your newly initialized data directory:
pg_ctl -D <data directory> -l postgresql.log start
Now you’re ready to start using TCapture check out the Adding a Primary node in TCapture section. !