centos7单机安装Greenplum6.2.1

一、环境准备:

操作系统:CentOS-7-x86_64-Minimal-1810.iso

数据库:greenplum-db-6.2.1-rhel7-x86_64.rpm

集群配置:1 master,1 primary segment , 1个mirror segment

二、安装linux系统后配置

2.1 基本配置

关闭防火墙:
  systemctl stop firewalld
禁止防火墙开机启动:
  systemctl disable firewalld
修改主机名:
  hostnamectl set-hostname master
配置主机域名:/etc/hosts
  192.168.111.111 master
关闭selinux:/etc/selinux/config
  SELINUX=disabled

2.2 修改内核:/etc/sysctl.conf

net.ipv4.ip_forward = 0 
net.ipv4.conf.default.accept_source_route = 0 
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_recycle = 1 
net.ipv4.tcp_max_syn_backlog = 4096 
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog= 10000 
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
net.core.somaxconn = 2048
kernel.sysrq = 1 
kernel.core_uses_pid = 1 
kernel.msgmni = 2048 
kernel.msgmax = 65536
kernel.msgmnb = 65536 
kernel.shmmni = 4096 
kernel.shmmax = 500000000 
kernel.shmall = 4000000000 
kernel.sem = 250 64000 100 512 
vm.overcommit_memory = 2

 

2.3 修改文件描述符文件:/etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

sysctl -p使配置生效

三、安装数据库

3.1 安装命令:

rpm -Uvh greenplum-db-6.2.1-rhel7-x86_64.rpm
或者
yum -y install greenplum-db-6.2.1-rhel7-x86_64.rpm

3.2 创建gpadmin用户并授权:

useradd gpadmin
passwd gpadmin (密码设为gpadmin123)
chown -R gpadmin /usr/local/greenplum*
chgrp -R gpadmin /usr/local/greenplum*

3.3 切换到gpadmin用户,并创建数据目录:

mkdir -p /data/gpdata/master
mkdir -p /data/gpdata/primary
mkdir -p /data/gpdata/mirror 

3.4 设置gpadmin用户的环境变量:.bash_profile和.bashrc

source /usr/local/greenplum-db/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/data/gpdata/master/gpseg-1
export PGPORT=5432
export PGUSER=gpadmin
export PGDATABASE=gpdb

使环境变量生效:
source .bash_profile .bashrc
 

3.5 添加节点服务器文件(本例是单机,故只需要写一个):/home/gpadmin/seg_hosts

master

3.6 设置ssh免密:

ssh-keygen
ssh-copy-id master
gpssh-exkeys -f /home/gpadmin/seg_hosts

 

四、初始化数据库

4.1 复制配置文件

cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/initGreenplum 

4.2 编辑配置文件 /home/gpadmin/gpinit ,修改下面内容:

declare -a DATA_DIRECTORY=(/data/gpdata/primary)
MASTER_HOSTNAME=master
MASTER_DIRECTORY=/data/gpdata/master
MASTER_PORT=5432
MIRROR_PORT_BASE=7000
DATABASE_NAME=gpdb
declare -a MIRROR_DATA_DIRECTORY=(/data/gpdata/mirror)
MACHINE_LIST_FILE=/home/gpadmin/seg_hosts
 

 

4.3 运行初始化命令

 gpinitsystem -c /home/gpadmin/initGreenplum

4.4 psql登录修改密码

psql -p 2345

修改数据库密码
       alter role gpadmin with password '1234';
退出: \q

 

4.5  远程连接配置

 vim /data/gpdata/master/gpseg-1/postgresql.conf
修改:
#listen_addresses = '*',去#注释
vim /data/gpdata/master/gpseg-1/pg_hba.conf
添加:
host     all         gpadmin         0.0.0.0/0               md5

4.6 重新加载配置文件

gpstop -u


其他启停命令

gpstart #正常启动
gpstop #正常关闭
gpstop -M fast #快速关闭
gpstop –r #重启

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
greenplum-db-6.2.1-rhel7-x86_64.rpm Pivotal Greenplum 6.2 Release Notes This document contains pertinent release information about Pivotal Greenplum Database 6.2 releases. For previous versions of the release notes for Greenplum Database, go to Pivotal Greenplum Database Documentation. For information about Greenplum Database end of life, see Pivotal Greenplum Database end of life policy. Pivotal Greenplum 6 software is available for download from the Pivotal Greenplum page on Pivotal Network. Pivotal Greenplum 6 is based on the open source Greenplum Database project code. Important: Pivotal Support does not provide support for open source versions of Greenplum Database. Only Pivotal Greenplum Database is supported by Pivotal Support. Release 6.2.1 Release Date: 2019-12-12 Pivotal Greenplum 6.2.1 is a minor release that includes new features and resolves several issues. New Features Greenplum Database 6.2.1 includes these new features: Greenplum Database supports materialized views. Materialized views are similar to views. A materialized view enables you to save a frequently used or complex query, then access the query results in a SELECT statement as if they were a table. Materialized views persist the query results in a table-like form. Materialized view data cannot be directly updated. To refresh the materialized view data, use the REFRESH MATERIALIZED VIEW command. See Creating and Managing Materialized Views. Note: Known Issues and Limitations describes a limitation of materialized view support in Greenplum 6.2.1. The gpinitsystem utility supports the --ignore-warnings option. The option controls the value returned by gpinitsystem when warnings or an error occurs. If you specify this option, gpinitsystem returns 0 if warnings occurred during system initialization, and returns a non-zero value if a fatal error occurs. If this option is not specified, gpinitsystem returns 1 if initialization completes with warnings, and returns value of 2 or greater if a fatal error occurs. PXF version 5.10.0 is included, which introduces several new and changed features and bug fixes. See PXF Version 5.10.0 below. PXF Version 5.10.0 PXF 5.10.0 includes the following new and changed features: PXF has improved its performance when reading a large number of files from HDFS or an object store. PXF bundles newer tomcat and jackson libraries. The PXF JDBC Connector now supports pushdown of OR and NOT logical filter operators when specified in a JDBC named query or in an external table query filter condition. PXF supports writing Avro-format data to Hadoop and object stores. Refer to Reading and Writing HDFS Avro Data for more information about this feature. PXF is now certified with Hadoop 2.x and 3.1.x and Hive Server 2.x and 3.1, and bundles new and upgraded Hadoop libraries to support these versions. PXF supports Kerberos authentication to Hive Server 2.x and 3.1.x. PXF supports per-server user impersonation configuration. PXF supports concurrent access to multiple Kerberized Hadoop clusters. In previous releases of Greenplum Database, PXF supported accessing a single Hadoop cluster secured with Kerberos, and this Hadoop cluster must have been configured as the default PXF server. PXF introduces a new template file, pxf-site.xml, to specify the Kerberos and impersonation property settings for a Hadoop or JDBC server configuration. Refer to About Kerberos and User Impersonation Configuration (pxf-site.xml) for more information about this file. PXF now supports connecting to Hadoop with a configurable Hadoop user identity. PXF previously supported only proxy access to Hadoop via the gpadmin Greenplum user. PXF version 5.10.0 deprecates the following configuration properties. Note: These property settings continue to work. The PXF_USER_IMPERSONATION, PXF_PRINCIPAL, and PXF_KEYTAB settings in the pxf-env.sh file. You can use the pxf-site.xml file to configure Kerberos and impersonation settings for your new Hadoop server configurations. The pxf.impersonation.jdbc property setting in the jdbc-site.xml file. You can use the pxf.service.user.impersonation property to configure user impersonation for a new JDBC server configuration. Note: If you have previously configured a PXF JDBC server to access Kerberos-secured Hive, you must upgrade the server definition. See Upgrading PXF in Greenplum 6.x for more information. Changed Features Greenplum Database 6.2.1 includes these changed features: Greenplum Stream Server version 1.3.1 is included in the Greenplum distribution. Resolved Issues Pivotal Greenplum 6.2.1 is a minor release that resolves these issues: 29454 - gpstart During Greenplum Database start up, the gpstart utility did not report when a segment instance failed to start. The utility always displayed 0 skipped segment starts. This issue has been resolved. gpstart output was also enhanced to provide additional warnings and summary information about the number of skipped segments. For example: [WARNING]:-********

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值