参考文章:在linux系统上安装Greenplum数据库  https://blog.csdn.net/mingli_a/article/details/78779189

Greenplum安装步骤  https://blog.csdn.net/u013181216/article/details/72605362

Greenplum安装  https://www.cnblogs.com/renlipeng/p/5685432.html

1. 下载地址:https://network.pivotal.io/products/pivotal-gpdb#/releases/204067/file_groups/1160

greenplum 需要注意下载的版本所依赖的系统。

greenplum需要注册账号才可以下载,且用于非商业用途。

greenplum需要建立多个库,主从备  master ,segment ,standby。

1.       Master:建立与客户端的连接和管理,执行计划向segment的分发收集执行结果。Master本身不负责数据存储,只存储数据字典。

2.       Segment:业务数据的存取,用户SQL的执行。

3.       Standby:当主库不能使用时,可替代变为主库。

linux 配置修改:

设置共享内存和最大网络连接数,因主副机之间会有数据交换。(master,segment都需要)

修改 /etc/sysctl.cof:

# Controls IP packet forwarding

net.ipv4.ip_forward = 

# Controls source route verification

net.ipv4.conf.default.rp_filter = 

 

# Do not accept source routing

net.ipv4.conf.default.accept_source_route =

 

# Controls the System Request debuggingfunctionality of the kernel

kernel.sysrq = 

 

# Controls whether core dumps will appendthe PID to the core filename.

# Useful for debugging multi-threadedapplications.

kernel.core_uses_pid = 

 

# Controls the use of TCP syncookies

net.ipv4.tcp_syncookies = 

 

# Disable netfilter on bridges

#net.bridge.bridge-nf-call-ip6tables = 

#net.bridge.bridge-nf-call-iptables = 

#net.bridge.bridge-nf-call-arptables = 

 

# Controls the default maxmimum size of amesage queue

kernel.msgmnb = 

 

# Controls the maximum size of a message,in bytes

kernel.msgmax = 

kernel.msgmni = 

 

kernel.sem =    

 

# Controls the maximum shared segment size,in bytes

#kernel.shmmax = 

kernel.shmmax =   --共享内存段最大值

kernel.shmmni =       --共享内存段最大值

 

# Controls the maximum number of sharedmemory segments, in pages

#kernel.shmall = 

kernel.shmall =    --共享内存段最大值

 

net.ipv4.tcp_tw_recycle=

net.ipv4.tcp_max_syn_backlog=

net.ipv4.ip_local_port_range =  

net.core.netdev_max_backlog=

vm.overcommit_memory=

net.ipv4.conf.all.arp_filter = 

net.core.rmem_max = 

net.core.wmem_max = 

同时修改最大连接数:

vi /etc/security/limits.conf(master,segment都需要)

#greenplum configs
* soft nofile
* hard nofile
* soft nproc
* hard nproc

如果存在/etc/security/limits.d/90-nproc.conf  (master,segment都需要)

则添加以下代码,不然以上limits.conf会被覆盖

* soft nproc 

I/O优化  (master,segment都需要)

vi /boot/grub/menu.lst  不做修改也没关系  
#greenplum configs
elevator=deadline

修改扇区读写能力  (master,segment都需要)

vi /etc/rc.d/rc.local

blockdev --setra  /dev/sda

修改主机host添加host地址:  (master,segment都需要)

/etc/hosts

192.168.68.128     pgm   pgm

192.168.68.129     pgs1   pgs1

192.168.68.130     pgs2   pgs2
#ip                  主机名       hostlist列表名

修改host地址:  (master,segment都需要)

vi /etc/sysconfig/network,要和主机名一致

NETWORKING=yes

HOSTNAME=[pgm]

我们可以此时用主机名测试:

》ping pgm

设置selinux为false

vim /etc/selinux/config 
SELINUX=disabled

创建用户:

useradd gpadmin
passwd gpadmin
groupadd -g 530 gpadmin
useradd -g 530 -u530 -m -d /home/gpadmin -s /bin/bash gpadmin
 

创建greenplum文件夹及设置访问权限。

mkdir /opt/greenplum
chown -R gpadmin:gpadmin /opt/greenplum

这时候开始安装。

安装greenplum:

下载地址:https://network.pivotal.io/products/pivotal-gpdb#/releases/204067/file_groups/1160

可通过securecrt的sftp命令实现下载包rpm上传(参见操作命令 securecrt)。

rpm -ivh greenplum-db-5.11.-rhel7-x86_64.rpm

安装后,文件会自动生成在  usr/local/文件夹下。

在此文件夹下的gp给gpadmin赋予权限。

chown -R gpadmin:gpadmin greenplum-db

此时主master上的db就算安装完毕。

接下来就是master的安装包节点分发操作:

创建配置文件:

[root@mdw ~]# su gpadmin
[gpadmin@mdw root]$ cd
[gpadmin@mdw ~]$ mkdir ./conf
[gpadmin@mdw ~]$ vi ./conf/hostlist
gpm
gps1
[gpadmin@mdw ~]$ vi ./conf/seg_hosts
gps1

安装节点转发到分节点:

[gpadmin@   ~]$ source /usr/local/greenplum-db/greenplum_path.sh
[gpadmin@   ~]$ gpssh-exkeys -f /home/gpadmin/conf/hostlist //打通节点

如果在step1就出错,则需要安装yum install openssh*。

安装过程在Step3时出现以下错误:

[ERROR gpm] [Errno None] Unable to connect to port  on 220.250.64.225
[ERROR gpm] skipping key exchange for gpm
[ERROR gpm] unable to authorize current user

这是因为在通过ssh访问22端口,可通过免密方式。要不然就是配置的host名不正确,仔细检查下。

手动设置方式:

gpssh -f /opt/greenplum/greenplum-db/conf/hostlist

step3时输入的密码要为root账号对应的密码要不然有可能权限问题而无法发送。

此时节点链接就算成功了。

下来就是压缩发送安装包:

》tar -cf /home/gpadmin/gp.4.3.tar /usr/local/greenplum-db-4.3.8.1/
》gpscp -f /home/gpadmin/conf/seg_hosts /home/gpadmin/gp5.11.tar =:/opt/greenplum
注意=:表示目标文件夹

Error:scp: /opt/greenplum/gp5.11.tar: Permission denied

说明目标文件夹的写权限没有,请检查节点机gpadmin是否有对文件的操作权限(writer)。

看gpadmin用户是否可以删除 greenplum确定权限是否充足。

此时,在分节点上查看是否已经导入成功。

通过主服务的ssh进行分节点的安装。

》gpssh -f hostlist
=》cd /opt/greenplum
=>tar -xvf gp5.11.tar
=>ln -s ./greenplum-db-5.11.3 greenplum-db //建立软连接
=>ll //查看

到此,节点安装就算完毕。

greenplum的更多相关文章

  1. Greenplum 的分布式框架结构

    Greenplum 的分布式框架结构 1.基本架构 Greenplum(以下简称 GPDB)是一款典型的 Shared-Nothing 分布式数据库系统.GPDB 拥有一个中控节点( Master ) ...

  2. 海量数据处理利器greenplum——初识

    简介及适用场景 如果想在数据仓库中快速查询结果,可以使用greenplum. Greenplum数据库也简称GPDB.它拥有丰富的特性: 第一,完善的标准支持:GPDB完全支持ANSI SQL 200 ...

  3. GreenPlum高效去除表重复数据

    1.针对PostgreSQL数据库表的去重复方法基本有三种,这是在网上查找的方法,在附录1给出.但是这些方法对GreenPlum来说都不管用. 2.数据表分布在不同的节点上,每个节点的ctid是唯一的 ...

  4. 实现从Oracle增量同步数据到GreenPlum

    简介: GreenPlum是一个基于PostgreSQL数据库开发的MPP架构的数据库仓库,适用于OLAP系统,支持50PB(1PB=1000TB)级海量数据的存储和处理. 背景: 目前有一个业务是需 ...

  5. Greenplum 源码安装教程 —— 以 CentOS 平台为例

    Greenplum 源码安装教程 作者:Arthur_Qin 禾众 Greenplum 主体以及orca ( 新一代优化器 ) 的代码以可以从 Github 上下载.如果不打算查看代码,想下载编译好的 ...

  6. 大数据系列-java用官方JDBC连接greenplum数据库

    这个其实非常简单,之所以要写此文是因为当前网上搜索到的文章都是使用PostgreSQL的驱动,没有找到使用greenplum官方驱动的案例,两者有什么区别呢? 一开始我也使用的是PostgreSQL的 ...

  7. Greenplum安装

    最近需要安装Greenplum测试一些东西,在安装过程中出现了许多问题,所以在这里将安装过程整理一下,主要参考<Greenplum企业应用实践>和http://jxzhfei.blog.5 ...

  8. Greenplum查询计划分析

    这里对查询计划的学习主要是对TPC-H中Query2的分析. 1.Query的查询语句 select s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_a ...

  9. Greenplum 数据库安装部署(生产环境)

    Greenplum 数据库安装部署(生产环境) 硬件配置: 16 台 IBM X3650, 节点配置:CPU 2 * 8core,内存 128GB,硬盘 16 * 900GB,万兆网卡. 万兆交换机. ...

  10. Greenplum测试环境部署

    1.准备3台主机 本实例是部署实验环境,采用的是Citrix的虚拟化环境,分配了3台RHEL6.4的主机. |------|------| |Master|创建模板后,额外添加20G一块磁盘/dev/ ...

随机推荐

  1. servlet简单的小例子

    去我云盘下载: https://pan.baidu.com/s/1E2yoZ2Nmk2FE2XjuPOCvjA 访问方式:http://localhost:8080/testServlet/index ...

  2. Map相关问题

    <!--加载地图开始--> <!DOCTYPE html><html><head> <meta charset="UTF-8" ...

  3. vue属性

    1. 图片地址: data:{ url:"https://www.baidu.com/img/bd_logo1.png"}, <img v-bind:src="ur ...

  4. 有关于Integer的一些小问题

    先看一小段源码: Integer a1=; Integer a2=; Integer b1=); Integer b2=); Integer c1=; Integer c2=; System.out. ...

  5. javascript-回归原生基础

    //添加事件监听兼容函数 function addHandler(target, eventType, handler){ if(target.addEventListener){//主流浏览器 ad ...

  6. ZooKeeper系列(8):ZooKeeper伸缩性

    一.ZooKeeper中Observer 1.1 ZooKeeper角色 经过前面的介绍,我想大家都已经知道了在ZooKeeper集群当中有两种角色Leader和Follower.Leader可以接受 ...

  7. 2-Zookeeper、HA安装

    1.Zookeeper安装 1.解压 zookeeper 到安装目录中/opt/app/zookeeper 中. 2.在安装目录下创建data和logs两个目录用于存储数据和日志: cd /opt/a ...

  8. 变量,if.elif .else判断

    一,计算机的了解 基本组成:主板+cpu+内存 cpu: 主频, 核数(16) 内存:大小(8G, 16G, 32G) 型号: DDR3, DDR4, DDR5,  主频(海盗船,玩家国度)      ...

  9. JVM总结-synchronized

    在 Java 程序中,我们可以利用 synchronized 关键字来对程序进行加锁.它既可以用来声明一个 synchronized 代码块,也可以直接标记静态方法或者实例方法. 当声明 synchr ...

  10. Linux中使用python测试主机存活 Linux系统CentOS Linux release 7.3.1611 (Core) py版本Python 2.7.5

    下面是最初的情况 #/usr/bin/env python # -*- coding: utf-8 -*- import os import time import subprocess import ...