Postgres-XL部署记录(二)

首先确保关闭防火墙,修改全部的服务器节点的hosts文件,准备包含全部服务器IP的extra_pg_hba.conf做为额外的参数。node

  1.配置ssh免登录sql

    ssh-keygen -t rsa  【不输入密码】bash

    cat id_rsa.pub > authorized_keys服务器

    scp authorized_keys postgres@192.168.97.102:/home/postgres/.ssh/ssh

    chmod 700 .ssh/          【两台机器都须要】post

    chmod 700 .ssh/authorized_keys    【两台机器都须要】测试

    ssh postgres@192.168.97.102  【测试登陆是否须要输入密码】it

    service firewalld stopast

  2.安装pgxc_ctl模块class

  3..bashrc中配置环境变量:

      export dataDirRoot$HOMNE/pgxl/nodes

      export PGHOME=/usr/local/pgsql

      export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH

      export PATH=$PATH:$HOME/bin:$PGHOME/bin

  4.在pgxc_ctl命令下建立空的配置文件:prepare config empty

  5.新增GTM master:PGXC$add gtm master gtm localhost 20001 $dataDirRoot/gtm

            monitor all  【查看服务运行状态】

  6.初始化coornode和datanode:

       add coordinator master coord1 localhost 30001 30011 $dataDirRoot/coord_master.1 none none

       add coordinator master coord2 localhost 30002 30012 $dataDirRoot/coord_master.2 none none

       add datanode master dn1 localhost 40001 40011 $dataDirRoot/dn_master.1 none none none

       add datanode master dn2 localhost 40002 40012 $dataDirRoot/dn_master.2 none none none

       【查看状态: monitor all】

相关文章
相关标签/搜索