从[Greenplum 6.0] 1分钟安装尝鲜开始
Greenplum目前6版本目前已经迭代了几个小版本了,随着版本的更新,不断的有bug被修复。
打算试用的朋友可以入手了。 作为开年的第一个工作日的第一个帖子,必须从“开天辟地”的6.0开始。以下内容较简略,适合稍微有基础的朋友,不适合作为安装部署圣经(这类帖子在网上肯定已经很多了,自行百度即可)。
- 尝试安装
目前Pivotal官方已经不再提供臃肿的bin安装包,而是通过对RedHat系更加友好的rpm包的方式发布,从官方下载到试用版本后(商用需要授权)直接执行安装。
http://www.1994july.club/?p=1470
[gpadmin6@gp1 ~]$ rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
错误:依赖检测失败:
apr 被 greenplum-db-6.0.0-1.el7.x86_64 需要
apr-util 被 greenplum-db-6.0.0-1.el7.x86_64 需要
bzip2 被 greenplum-db-6.0.0-1.el7.x86_64 需要
krb5-devel 被 greenplum-db-6.0.0-1.el7.x86_64 需要
libevent 被 greenplum-db-6.0.0-1.el7.x86_64 需要
libyaml 被 greenplum-db-6.0.0-1.el7.x86_64 需要
rsync 被 greenplum-db-6.0.0-1.el7.x86_64 需要
执行后发现,rpm包自动检测软件依赖并提示,话不多说,自行yum安装对应的安装包即可,如果是内网环境,可以从iso或者findrpm等网站上找到对应的rpm包手工安装。
- 更新依赖包后继续尝试安装
[gpadmin6@gp1 ~]$ rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
错误:can't create 事务 lock on /var/lib/rpm/.rpm.lock (权限不够)
http://www.1994july.club/?p=1468
报错了啊,怎么回事??因为权限不够哈哈,大家可能已经发现,我是用gpadmin6用户安装的,此时有2种解决方法:1.直接用root安装 2.给gpadmin6 sudo权限。当然生产上还是建议采用第二种,毕竟root权限太危险了。
- 切换到root用户继续尝试安装
[root@gp1 gpadmin6]# rpm -ivh greenplum-db-6.0.0-rhel7-x86_64.rpm
准备中... ################################# [100%]
正在升级/安装...
1:greenplum-db-6.0.0-1.el7 ############### ( 46%)
我手速没那么快,不能截取100%的安装状态,请不要挑刺了,只要几秒钟,软件安装成功。默认安装到/usr/local/目录下。
- 将软件赋权给实际管理员用户
- http://www.1994july.club/?p=1468
因为上面使用root用户安装的,所以真正要使用gpadmin6作为管理员用户,那么需要将软件的所属权限赋予gpadmin6。如果是采用gpadmin6直接安装的,那就不需要多此一举喽。
[root@gp1 gpadmin6]# ls -al /usr/local
总用量 0
drwxr-xr-x. 13 root root 177 9月 5 19:26 .
drwxr-xr-x. 13 root root 155 9月 1 21:55 ..
drwxr-xr-x. 2 root root 6 4月 11 2018 bin
drwxr-xr-x. 2 root root 6 4月 11 2018 etc
drwxr-xr-x. 2 root root 6 4月 11 2018 games
lrwxrwxrwx 1 root root 29 1月 2 19:26 greenplum-db -> /usr/local/greenplum-db-6.0.0
drwxr-xr-x 11 root root 187 1月 2 19:26 greenplum-db-6.0.0
[root@gp1 gpadmin6]# chown -Rf gpadmin6:gpadmin /usr/local/greenplum-db*
[root@gp1 gpadmin6]# ls -al /usr/local
http://www.1994july.club/?p=1466
总用量 0
drwxr-xr-x. 13 root root 177 9月 5 19:26 .
drwxr-xr-x. 13 root root 155 9月 1 21:55 ..
drwxr-xr-x. 2 root root 6 4月 11 2018 bin
drwxr-xr-x. 2 root root 6 4月 11 2018 etc
drwxr-xr-x. 2 root root 6 4月 11 2018 games
lrwxrwxrwx 1 gpadmin6 gpadmin 29 1月 2 19:26 greenplum-db -> /usr/local/greenplum-db-6.0.0
drwxr-xr-x 11 gpadmin6 gpadmin 187 1月 2 19:26 greenplum-db-6.0.0
设置gpadmin6用户环境变量
[gpadmin6@gp1 ~]$ cat .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
source /usr/local/greenplum-db/greenplum_path.sh
这个环境变量主要是用来生效管理命令的,其他的环境变量暂时还没配置。
- SSH互信设置
- http://www.1994july.club/?p=1464
[gpadmin6@gp1 ~]$ gpssh-exkeys -h gp1
[STEP 1 of 5] create local ID and authorize on local host
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] retrieving credentials from remote hosts
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
http://www.1994july.club/?p=1462
[INFO] completed successfully
用过的人都懂,不设置互信拉集群的时候可能会比较麻烦哦。
创建数据目录
集群初始化的时候不会自动创建目录的,需要手工创建好。
[root@gp1 gpadmin6]# mkdir -p /gpdata/primary
[root@gp1 gpadmin6]# mkdir -p /gpdata/master
[root@gp1 gpadmin6]# chown -Rf gpadmin6:gpadmin /gpdata
配置初始化文件
这里主要关注master和segment的目录,主机名和数据库端口号配置即可,其他的也可以忽略。
[gpadmin6@gp1 ~]$ cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config ~
[gpadmin6@gp1 ~]$ vim gpinitsystem_config
[gpadmin6@gp1 ~]$ cat gpinitsystem_config
# FILE NAME: gpinitsystem_config
# Configuration file needed by the gpinitsystem
################################################
#### REQUIRED PARAMETERS
http://www.1994july.club/?p=1460
################################################
#### Name of this Greenplum system enclosed in quotes.
ARRAY_NAME="Greenplum Data Platform"
#### Naming convention for utility-generated data directories.
SEG_PREFIX=gpseg
#### Base number by which primary segment port numbers
#### are calculated.
PORT_BASE=6000
#### File system location(s) where primary segment data directories
#### will be created. The number of locations in the list dictate
#### the number of primary segments that will get created per
#### physical host (if multiple addresses for a host are listed in
#### the hostfile, the number of segments will be spread evenly across
#### the specified interface addresses).
declare -a DATA_DIRECTORY=(/gpdata/primary /gpdata/primary)
#### OS-configured hostname or IP address of the master host.
MASTER_HOSTNAME=gp1
http://www.1994july.club/?p=1458
#### File system location where the master data directory
#### will be created.
MASTER_DIRECTORY=/gpdata/master
#### Port number for the master instance.
MASTER_PORT=5432
- 初始化数据库
下面开始初始化数据库了,细节忽略(没意义),hostfile文件中只有一个主机名gp1
[gpadmin6@gp1 ~]$ gpinitsystem -c gpinitsystem_config -h hostfile
- 最后登录尝鲜
[gpadmin6@gp1 ~]$ psql -d postgres
psql (9.4.24)
Type "help" for help.
postgres=# create table t1(id serial, name varchar(10)) distributed replicated;
CREATE TABLE
^
postgres=# insert into t1(name) values('chris'),('yuan'),('jenny');
INSERT 0 3
postgres=# select * from t1;
id | name
----+-------
1 | chris
2 | yuan
3 | jenny
(3 rows)
http://www.1994july.club/?p=1456
postgres=# \q
[gpadmin6@gp1 ~]$
- 复盘分享
# 6.0安装明显比之前安装起来更舒服更方便了,熟练工基本1分钟就能完成单机测试环境安装;
# 安装之前会检测一些依赖软件,不至于在安装过程中报错重新去查漏补缺;
# 数据目录还是需要自己处理,要是数据目录也能自动创建就好了(目前机制可能更注重数据的保护,方式误操作磁盘导致机器上其他数据异常丢失?)
# 目前Greenplum 6.0版本已经merge到PostgreSQL 9.4了。
http://www.1994july.club/?p=1454
End~
从[Greenplum 6.0] 1分钟安装尝鲜开始的更多相关文章
- 来自 Vue 3.0 的 Composition API 尝鲜
来自 Vue 3.0 的 Composition API 尝鲜:https://segmentfault.com/a/1190000020205747
- (转载)Redis5.0重量级特性Stream尝鲜
转 导读:Redis5.0最新重点推出了Stream的支持,给众多架构师在消息队列方面带来了新的选择,特别是Redis粉丝们绝对是一个福音.那么Redis的Stream有哪些特别的功能?跟kafka有 ...
- C++17尝鲜
https://cloud.tencent.com/developer/article/1351910 [译]C++17,optional, any, 和 variant 的更多细节 用户261520 ...
- GreenPlum 5.0的安装
基本环境: server IP MDW 172.16.16.31 SDW1 172.16.16.34 SDW2 172.16.16.35 1:检查操作系统是否符合要求,以及系统设置. 我这里使用的系统 ...
- 『GreenPlum系列』GreenPlum 4节点集群安装(图文教程)
目标架构如上图 一.硬件评估 cpu主频,核数推荐CPU核数与磁盘数的比例在12:12以上Instance上执行时只能利用一个CPU核资源进行计算,推荐高主频 内存容量 网络带宽重分布操作 R ...
- _00024 尼娜抹微笑伊拉克_云计算ClouderaManager以及CHD5.1.0群集部署安装文档V1.0
笔者博文:妳那伊抹微笑 itdog8 地址链接 : http://www.itdog8.com(个人链接) 博客地址:http://blog.csdn.net/u012185296 博文标题:_000 ...
- 分布式监控系统Zabbix-3.0.3-完整安装记录(1)
分布式监控系统Zabbix-3.0.3的安装记录 环境说明zabbix-server:192.168.1.30 #zabbix的服务端(若要监控本机,则需要配置本机的Zabbix agent, ...
- Greenplum入门——基础知识、安装、常用函数
Greenplum入门——基础知识.安装.常用函数 2017年10月08日 22:03:09 在咖啡里溺水的鱼 阅读数:8709 版权声明:本文为博主原创,允许非商业性质转载但请注明原作者和出处 ...
- 分布式监控系统Zabbix-3.0.3-完整安装记录(7)-使用percona监控MySQL
前面已经介绍了分布式监控系统Zabbix-3.0.3-完整安装记录(2)-添加mysql监控,但是没有提供可以直接使用的Key,太过简陋,监控效果不佳.要想更加仔细的监控Mysql,业内同学们都会选择 ...
随机推荐
- 使用apply调用函数
实现函数 calllt,调用之后满足如下条件1.返回的结果为调用fn之后的结果2.fn的调用为calllt的第一个参数之后的全部参数 方法1 使用es6 function calllt(...para ...
- ArryList的使用方法(基础使用-将来会不断添加)
转自:http://www.cnblogs.com/ysz12300/p/5595907.html 引入ArryList的方法->命名空间:using System.Collections; A ...
- P5091 【模板】欧拉定理(欧拉降幂)
P5091 [模板]欧拉定理 以上3张图是从这篇 博客 里盗的,讲的比较清楚. #include<bits/stdc++.h> using namespace std; typedef l ...
- apache2+django+virtualenv 服务器部署实战
目录 基本配置 配置python环境 安装 python.pip 安装 virtualenv 配置python虚拟环境 配置 apache2 安装 apache2 安装 mod-wsgi 服务 部署d ...
- java课程之团队开发冲刺阶段2.7
昨日总结: 1.完整实现课前闹钟提醒功能 遇到的困难: 1.没有遇到大的问题,细节地方没有处理好出现了一下小的情况 今天的任务: 1.实现对课程查询的完整实现 当日总结: 1.以前是使用二级联动下拉框 ...
- 创建了以个vagrant box centos php7 nginx swoole git
php7.2.9 centos7 nginx.1.16 swoole4.4.4 下载地址 链接:https://pan.baidu.com/s/14p7xIa0ZZigRuYvZxnMsYA 提取 ...
- 设置Apache(httpd)和Nginx 开机自启动
方法1: 进入目录: vi /etc/rc.d/rc.local #设置apache 和 nginx 开机自启动/usr/sbin/apachectl start/usr/sbin/nginx s ...
- PAT Advanced 1151 LCA in a Binary Tree (30) [树的遍历,LCA算法]
题目 The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both ...
- python刷LeetCode:13. 罗马数字转整数
难度等级:简单 题目描述: 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M. 字符 数值I 1V 5X 10L 50C 100D 500M 1000例如, 罗马数字 2 写做 II ...
- 51nod 1346:递归
1346 递归 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注 函数f(n,m) { 若n=1或m=1返回a[n][m]; 返回f(n-1,m)异或 ...