PostgreSQL集群方案-Postgres-XL问题记录

Postgres-XL问题记录

pgxl10集群问题

安装postgis后问题

问题描述

在node2节点和node3、node4、node5、node6节点安装postgis后,postgis报错并且集群创建数据库卡住

image-20201203084600460

解决尝试

日期:2020-12-03

  1. 准备还原node2节点到为安装postgis的状态

  2. 不行就将node5、node6节点也还原到未安装postgis的状态,并查看集群状态

    问题未解决

尝试安装postgis

安装包目录授权

sudo chown -R postgres:postgres  /usr/local/pg/lib
  1. 安装GCC

    yum install -y gcc gcc-c++
    
  2. 安装Proj4

    wget http://download.osgeo.org/proj/proj-5.2.0.tar.gz
    tar -zxvf proj-5.2.0.tar.gz
    cd proj-5.2.0
    ./configure  --prefix=/home/postgres/proj-5.2.0
    make
    make install
    
  3. 安装GEOS

    wget https://download.osgeo.org/geos/geos-3.7.0.tar.bz2
    tar -jxvf geos-3.7.0.tar.bz2
    cd geos-3.7.0
    ./configure --prefix=/home/postgres/geos-3.7.0
    make
    make install
    
  4. 安装GDAL

    wget https://download.osgeo.org/gdal/2.3.2/gdal-2.3.2.tar.gz
    tar -zxvf gdal-2.3.2.tar.gz
    cd gdal-2.3.2
    ./configure  --prefix=/home/postgres/gdal-2.3.2 --with-pg=/home/postgres/pgxl10/bin/pg_config
    make
    make install
    
  5. 安装JSON-C

    wget https://github.com/json-c/json-c/archive/json-c-0.13.1-20180305.tar.gz
    tar -zxvf json-c-json-c-0.13.1-20180305.tar.gz
    cd json-c-json-c-0.13.1-20180305
    ./configure  --prefix=/home/postgres/json-c-0.13.1
    make
    make install
    
  6. 安装LIBXML2

    rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    yum install libxml2 libxslt -y
    yum -y install libxml2 libxml2-dev libxml libxml2*
    
  7. 安装Protobuf

    wget https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz
    tar zxvf protobuf-all-3.6.1.tar.gz
    # yum install libtool -y
    ./autogen.sh
    #配置安装目录
    ./configure  --prefix=/home/postgres/protobuf-3.6.1
    make
    make install
    #配置环境变量,增加/home/postgres/protobuf-3.6.1安装目录
    vi /etc/profile
    export CMAKE_HOME=/usr/bin/cmake
    export PKG_CONFIG_PATH=/home/postgres/protobuf-3.6.1/lib/pkgconfig
    export PROTOBUF_HOME=/home/postgres/protobuf-3.6.1
    export PATH=$CMAKE_HOME/bin:$PROTOBUF_HOME/bin:$PATH
    #保存退出
    source /etc/profile
    #验证protobuf执行程序
    protoc --version
    #出现libprotoc 3.6.1说明安装成功
    
  8. 安装protobuf-c

    wget https://github.com/protobuf-c/protobuf-c/releases/download/v1.3.1/protobuf-c-1.3.1.tar.gz
    tar -zxvf protobuf-c-1.3.1.tar.gz    
    cd protobuf-c-1.3.1  
    #导入protobuf的pkgconfig,否则"--No package 'protobuf' found"
    export PKG_CONFIG_PATH=/home/postgres/protobuf-3.6.1/lib/pkgconfig
    ./configure  --prefix=/home/postgres/protobuf-c-1.3.1
    make    
    make install   
    #配置环境变量,增加下protobuf-c-1.3.1/bin
    vi /etc/profile
    export PATH=:/home/postgres/protobuf-c-1.3.1/bin
    #保存退出
    source ~/.bashrc
    
  9. 安装CGAL(可选)

    yum install boost-devel -y
    # 安装指定版本cgal-4.13
    wget https://github.com/CGAL/cgal/archive/releases/CGAL-4.13.tar.gz
    tar -zxvf CGAL-4.13.tar.gz   
    cd CGAL-4.13  
    mkdir build & cd build 
    #cmake不要指定安装路径
    cmake ..
    make    
    make install
    
  10. 安装postgis

    ./configure --prefix=/home/postgres/postgis-3.0.2 --with-gdalconfig=/home/postgres/gdal-2.3.2/bin/gdal-config --with-pgconfig=/home/postgres/pgxl10/bin/pg_config --with-geosconfig=/home/postgres/geos-3.7.0/bin/geos-config --with-projdir=/home/postgres/proj-5.2.0 --with-jsondir=/home/postgres/json-c-0.13.1 --with-protobufdir=/home/postgres/protobuf-c-1.3.1
    
    make && make install
    

猜你喜欢

转载自blog.csdn.net/qq_36213352/article/details/117856629