.. _installation: TCapture Installation =========================== Install PostgreSQL --------------------------- 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**. .. _`installing PostgreSQL`: https://www.postgresql.org/download/ Install TCapture --------------------------- 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. .. code-block:: sh 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/ Configuring a primary database node ---------------------------------- check out the :ref:`addproducer` section. ! PostgreSQL hba Configuration --------------------- By default, PostgreSQL is not configured to allow incoming connections from remote hosts. To enable incoming connections, first set the following line in :code:`postgresql.conf`: .. code-block:: sh listen_addresses = '*' And in :code:`pg_hba.conf`, add a line such as the following to allow incoming connections: .. code-block:: sh host all all / md5 For example, to allow incoming connections from any host: .. code-block:: sh host all all 0.0.0.0/0 md5 Running PostgreSQL --------------------- To run the PostgreSQL server in the background, use the :code:`pg_ctl` driver and point it to your newly initialized data directory: .. code-block:: sh pg_ctl -D -l postgresql.log start Now you’re ready to start using TCapture check out the :ref:`addproducer` section. !