FANDOM


What we've determinedEdit

As in Real Server configuration, we've assigned the following:

  1. User: postgresxc
  2. Configure at: node01 and node02
  3. Work directory: /home/postgresxc/pgxc/gtm_proxy
  4. Node name: gtm_pxy1 and gtm_pxy2
  5. Port number: 20001
  6. gtm host: node03
  7. gtm port: 20001

First, we create template of GTM Proxy at node01 as follows:

[main]$ ssh node01
[node01]$ initgtm -Z gtm_proxy -D /home/postgresxc/pgxc/gtm_proxy
[node01]$

initgtm creates template configuration file for gtm. For details, please visit initgtm document page.

Now you should add node name and port number to the configuration file, gtm.conf.

It is very simple. Do as follows:

[node01]$ cat >> /home/postgresxc/pgxc/gtm_proxy/gtm_proxy.conf << EOF
nodename = 'gtm_pxy1'
listen_addresses = '*'
port = 20001
gtm_port = 20001
gtm_host = 'node03'
EOF
[node01]$ exit
[main]$

You can do the same thing using your favorite text editor like vi or emacs. With them, you will find many example lines of the configuration file.

Now, configure gtm_pxy2 at node02.

[main]$ ssh node02
[node02]$ initgtm -Z gtm_proxy -D /home/postgresxc/pgxc/gtm_proxy
[node02]$ cat >> /home/postgresxc/pgxc/gtm_proxy/gtm_proxy.conf << EOF
nodename = 'gtm_pxy2'
listen_addresses = '*'
port = 20001
gtm_port = 20001
gtm_host = 'node03'
EOF
[node02]$ exit
[main]$

You finished your GTM_proxy configuration.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.