前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Greenplum编译安装

Greenplum编译安装

作者头像
shaonbean
发布2020-09-22 10:47:00
1.9K0
发布2020-09-22 10:47:00
举报
文章被收录于专栏:运维前线

Greenplum部署手册

一、环境准备

  • 操作系统
代码语言:javascript
复制
ARM-Neokylin7.6-64bit
  • 安装包
代码语言:javascript
复制
 greenplum6.9.1(源码)
  • 设置语言
代码语言:javascript
复制
echo "export LANG=en_US.UTF-8" >> /etc/profile
source /etc/profile
  • 编译环境
代码语言:javascript
复制
yum install -y curl-devel bzip2-devel python-devel openssl-devel readline-devel perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel perl-devel apr-devel libevent-devel libyaml libyaml-devel libedit-devel libffi-devel autoconf libtool automake flex wget zlib* openssl openssl-devel libffi-devel

二、安装

  • 机器
代码语言:javascript
复制
ip地址
  • 架构
  • 磁盘目录
代码语言:javascript
复制
说明	位置
安装源码	/opt/gpsrc
数据存储	/opt/gpdb/data
运行日志	/opt/gpdb
运行	/opt/gpdb
配置目录	/opt/gpdbß
  • 创建目录
  • 安装依赖包
代码语言:javascript
复制
安装setuptools
# cd setuptools-master# python bootstrap.py# python setup.py install
安装psutil
# cd psutil-5.7.2# python setup.py install
安装pbr
# cd pbr-5.4.5# python setup.py install
安装lockfile
# cd lockfile-0.12.2# python setup.py install
安装pycparser
# cd pycparser-2.20# python setup.py install
安装cffi
# cd cffi-1.14.1# python setup.py install
安装six
# cd six-1.15.0# python setup.py install
安装bcrypt
# cd bcrypt-3.1.7# python setup.py install
安装PyNaCl
# cd PyNaCl-1.4.0# python setup.py install
安装ipaddress
# cd ipaddress-1.0.23# python setup.py install
安装enum34
# cd enum34-1.1.10# python setup.py install
安装cryptography
# cd cryptography-3.0# python setup.py install
安装paramiko
# cd paramiko-2.7.1# python setup.py install
安装epydoc
# cd epydoc-3.0.1# python setup.py install

安装cmake
# cd cmake-3.9.2# ./bootstrap# make# make install# /usr/local/bin/cmake --version 
安装zstd
# cd zstd-1.4.5# make# make install
安装Xerces
# cd gp-xerces-3.1.2-p1# ./configure# make# make install
安装re2c
# cd re2c-2.0# ./autogen.sh# ./configure# make# make install
安装ninja
# cd ninja-1.10.0# ./configure.py --bootstrap# cp ninja /usr/bin/
安装gporca
# cd gporca-3.106.1# cmake -GNinja -H. -Bbuild# vi libgpos/src/common/CStackDescriptor.cpp第167行注释掉 
# ninja install -C build# echo /usr/local/lib >/etc/ld.so.conf# ldconfig
  • 安装gp
代码语言:javascript
复制
源码:
greenplum-6.9.1-src-full.tar.gz


# cd gpdb_src/
#./configure --with-perl --with-python --with-libxml --prefix=/opt/gpdb --disable-orca
# make
# make install

7.	创建用户和组gpadmin
#groupadd -g  3030 gpadmin
#useradd -u 3030 gpadmin -g gpadmin -d /opt/gpdb/gpadmin
#passwd gpadmin
       设置密码,例如gpadmin

 #vim /etc/hosts 
 添加30.23.111.45 gpmaster

 #su – gpadmin
 #mkdir ~/.ssh
 #chmod 700 ~/.ssh
 #cd .ssh/
 #ssh-keygen -t rsa
 #ssh gpmaster cat ~/.ssh/id_rsa.pub >>authorized_keys
        #chmod 600 authorized_keys
      #ssh gpmaster date

8.	GP初始化

Root用户:
#mkdir -p /opt/gpdb/data/master
#mkdir -p /opt/gpdb/data/gp1
#mkdir -p /opt/gpdb/data/gp2
#mkdir -p /opt/gpdb/data/gp3
#mkdir -p /opt/gpdb/data/gp4

      chown -R gpadmin:gpadmin /opt/gpdb

      su - gpadmin


#cd /opt/gpdb
#vim greenplum_path.sh

添加
export MASTER_DATA_DIRECTORY=/opt/gpdb/data/master/gpseg-1
export PGPORT=5432
export PGUSER=gpadmin
export PGDATABASE=gpmaster

#source greenplum_path.sh

#vim ~/.bash_profile
添加source /opt/gpdb/greenplum_path.sh
#source ~/.bash_profile

# vim all_hosts_file
添加当前主机名称:gpmaster

cd ~/.ssh
ssh-keygen -t rsa
cat id_rsa.pub >>authorized_keys

      # gpssh-exkeys -f all_hosts_file


9.	初始化gp

 #su - gpadmin
        # cp docs/cli_help/gpconfigs/gpinitsystem_config .
        # vim gpinitsystem_config

        #declare -a DATA_DIRECTORY=(/opt/gpdb/data/gp1 /opt/gpdb/data/gp2 /opt/gpdb/data/gp3 /opt/gpdb/data/gp4)
        #MASTER_HOSTNAME=gpmaster
        #MASTER_DIRECTORY=/opt/gpdb/data/master
        #DATABASE_NAME=gpmaster

 #vim seg_hosts_file
添加当前主机名称,例如SZD-BDL0014729,可以从/etc/hosts查看

        # gpinitsystem -c gpinitsystem_config -h seg_hosts_file

       一路yes

三、启动

四、安装错误

  • 安装错误
代码语言:javascript
复制
/tmp/cc4A3KMY.s: Assembler messages:
/tmp/cc4A3KMY.s:25: Error: unknown mnemonic `movq' -- `movq %rbp,x19'
make[6]: *** [CStackDescriptor.o] Error 1
make[6]: Leaving directory `/opt/gpsrc/gpdb_src/src/backend/gporca/libgpos/src/common'
make[5]: *** [common-recursive] Error 2
make[5]: Leaving directory `/opt/gpsrc/gpdb_src/src/backend/gporca/libgpos/src'
make[4]: *** [src-recursive] Error 2
make[4]: Leaving directory `/opt/gpsrc/gpdb_src/src/backend/gporca/libgpos'
make[3]: *** [libgpos-recursive] Error 2
make[3]: Leaving directory `/opt/gpsrc/gpdb_src/src/backend/gporca'
make[2]: *** [gporca-recursive] Error 2
make[2]: Leaving directory `/opt/gpsrc/gpdb_src/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory `/opt/gpsrc/gpdb_src/src'
make: *** [all-src-recurse] Error 2

解决:
**disable-orca**
  • 初始化错误:
代码语言:javascript
复制
# gpinitsystem -c gpinitsystem_config -h seg_hosts_file
20200911:14:08:09:043912 gpinitsystem:SZD-BDL0014729:root-[INFO]:-Checking configuration parameters, please wait...
20200911:14:08:09:043912 gpinitsystem:SZD-BDL0014729:root-[FATAL]:-Unable to run this script as root Script Exiting!
  • 启动错误
代码语言:javascript
复制
$ gpstart
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Starting gpstart with args:
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Gathering information and validating the environment...
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 6.0.0-beta.1 build dev'
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Greenplum Catalog Version: '301908232'
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Starting Master instance in admin mode
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[INFO]:-Obtaining Segment details from master...
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[ERROR]:-FATAL - no master dbs defined!
20200911:15:21:33:052842 gpstart:SZD-BDL0014729:gpadmin-[CRITICAL]:-gpstart failed. (Reason='Error: GpArray() - no master dbs defined') exiting...

修改host,重新初始化
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/09/18 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Greenplum部署手册
    • 一、环境准备
      • 二、安装
        • 三、启动
          • 四、安装错误
          相关产品与服务
          数据保险箱
          数据保险箱(Cloud Data Coffer Service,CDCS)为您提供更高安全系数的企业核心数据存储服务。您可以通过自定义过期天数的方法删除数据,避免误删带来的损害,还可以将数据跨地域存储,防止一些不可抗因素导致的数据丢失。数据保险箱支持通过控制台、API 等多样化方式快速简单接入,实现海量数据的存储管理。您可以使用数据保险箱对文件数据进行上传、下载,最终实现数据的安全存储和提取。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档