当前位置:网站首页>03 gp cluster construction
03 gp cluster construction
2022-08-01 16:33:00 【blue wind 9】
前言
呵呵 Recently a series of environmental building related requirements
记录一下
gp 三个节点 : 192.168.110.72, 192.168.110.73, 192.168.110.75
72 为 master, 73 为 slave01, 75 为 slave02
Three machines have done trusted shell
gp 单节点 docker 搭建
参照 Docker Hub
gp 搭建步骤
三节点集群
72, 73, 75 三台机器
72 作为 admin, 73, 75 作为 segment
71 别名为 gp1, 72 别名为 gp2, 75 别名为 75
1. 修改 hosts, 以及 hostname, 然后重启
192.168.110.72 gp1
192.168.110.73 gp2
192.168.110.75 gp3
2. 将 gp_yum.tar.gz, greenplum-db-6.0.0-rhel7-x86_64.rpm
按照 installWithDeps.txt In order to install
Connect the soft greenplum-db 修改为 gpdb
greenplum_path.sh 增加可执行权限
上传 hostfile, seg_hosts 到 gpdb 里面
上传 initgp_config 到 docs/cli_help/gpconfigs/ 目录下, Please note that according to the actual host adjust initgp_config 的 hostname
3. 新建 master 目录, 和 segment 目录
mkdir -p /data/gpdb/master
mkdir -p /data/gpdb/mdata1
mkdir -p /data/gpdb/pdata1
mkdir -p /data/gpdb/mdata2
mkdir -p /data/gpdb/pdata2
4. 新建用户 And adjust the user permissions
groupadd gpadmin
useradd -g gpadmin gpadmin
passwd gpadmin gpadmin
chown -R gpadmin:gpadmin /usr/local/gpdb/
chown -R gpadmin:gpadmin /data/gpdb
5. 配置内核参数
配置内核参数,添加如下内容:
vi /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.sem = 250 64000 100 512
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
kernel.sem = 250 64000 100 512
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_max_syn_backlog=4096
net.core.netdev_max_backlog=10000
vm.overcommit_memory=2
net.ipv4.conf.all.arp_filter = 1
6. 配置 gpadmin 环境变量, vim /home/gpadmin/.bashrc
source /usr/local/gpdb/greenplum_path.sh
export MASTER_DATA_DIRECTORY=/data/gpdb/master/gpseg-1
export LD_LIBRARY_PATH=/usr/local/gpdb/lib
7. 配置 gp1 到 gp2, gp3 的免密码登录
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
8. 防火墙开放相关端口
firewall-cmd --add-port=5432/tcp --permanent
firewall-cmd --add-port=6000-6010/tcp --permanent
firewall-cmd --add-port=30000-65535/udp --permanent
firewall-cmd --reload
firewall-cmd --list-all
9. 在 gp1 The host to perform above 初始化
gpinitsystem -c /usr/local/gpdb/docs/cli_help/gpconfigs/initgp_config -h /usr/local/gpdb/seg_hosts
# Need to perform can delete related, Number and the corresponding process, 锁文件
rm -rf /data/gpdb/master/*
rm -rf /data/gpdb/mdata1/*
rm -rf /data/gpdb/mdata2/*
rm -rf /data/gpdb/pdata1/*
rm -rf /data/gpdb/pdata2/*
10. 创建用户以及授权
CREATE USER pico WITH PASSWORD 'pico-nf-8100';
GRANT ALL PRIVILEGES ON DATABASE meiya TO pico;
如果默认的ssh端口不为 22
This is our deployment of a problem in the process of, 尝试过修改 gpinitsystem, gpstart 脚本来解决问题
但是 太过于复杂,
The final way is 修改 initgp_config 中的 TRUSTED_SHELL 的配置, 原来为 "ssh", 更新为 "ssh -p 3333"
And at least the following documents, The following parts of the update
[[email protected] gpdb]# grep -R 55566 *
bin/gpssh-exkeys: args = ['ssh', '-p 55566', self.m_host, '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes', '-n',
bin/gpssh-exkeys: args = ['ssh -p 55566', self.m_host, '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes',
bin/gpssh-exkeys: cmd = 'ssh -p 55566 -o "BatchMode=yes" -o "StrictHostKeyChecking=no" %s true 2>%s' % (hostname, errfile)
bin/gpssh-exkeys: cmd = ['ssh -p 55566', remoteHost.host(), '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes', 'true']
bin/gpssh-exkeys: cmd = ('scp -P 55566 -q -o "BatchMode yes" -o "NumberOfPasswordPrompts 0" ' +
bin/gpssh-exkeys: cmd = ('scp -P 55566 -q -o "BatchMode yes" -o "NumberOfPasswordPrompts 0" ' +
bin/lib/gp_bash_functions.sh:if [ x"$TRUSTED_SHELL" = x"" ]; then TRUSTED_SHELL="$SSH -p 55566"; fi
bin/lib/gp_bash_functions.sh:if [ x"$TRUSTED_COPY" = x"" ]; then TRUSTED_COPY="$SCP -P 55566"; fi
docs/cli_help/gpconfigs/initgp_config:TRUSTED_SHELL="ssh -p 55566"
Binary file lib/python/gppylib/commands/base.pyc matches
lib/python/gppylib/commands/base.py: cmd.cmdStr = "ssh -p 55566 -o StrictHostKeyChecking=no -o ServerAliveInterval=60 " \
The host name has been adjusted, 但是 gpinitsystem, gpstart In the process of or use localhost.domain
这个需要进入到 gpMaster 的 template1 数据库 查询节点信息, 然后调整 节点 数据
进入postgre PGOPTIONS="-c gp_session_role=utility" psql -d postgres
数据库查看 \l
数据分布 select * from gp_segment_configuration order by dbid;
报错 ERROR: permission denied: "gp_segment_configuration" is a system catalog
set allow_system_table_mods='TRUE';
Attached the above mentioned gp6.0 相关
greenplum6.0安装相关-C++文档类资源-CSDN下载
完
边栏推荐
猜你喜欢

MLX90640 红外热成像仪测温模块开发笔记(完整版)

OneFlow源码解析:Op、Kernel与解释器

第一次改开源中间件keycloak总个结

ESP8266-Arduino programming example-GA1A12S202 logarithmic scale analog light sensor

七夕专属博文-使用QGraphics画“红心“或“黑心“(含数学模型讲解)

pynlpir更新license Error: unable to fetch newest license解决方案

指针进阶(三)之指针与数组笔试题

04 flink 集群搭建

每日优鲜大败局

华盛顿大学、Allen AI 等联合 | RealTime QA: What's the Answer Right Now?(实时 QA:现在的答案是什么?)
随机推荐
22年镜头“卷”史,智能手机之战卷进死胡同
Winform的UI帮助类——部分组件会使用到DevExpress组件
06 redis 集群搭建
直播app开发,是优化直播体验不得不关注的两大指标
AntDB数据库亮相24届高速展,助力智慧高速创新应用
【硬核拆解】50块2个的2022年夏季款智能节电器到底能不能省电?
90后的焦虑,被菜市场治好了
ESP8266-Arduino编程实例-GA1A12S202对数刻度模拟光传感器
IronOS, an open source system for portable soldering irons, supports a variety of portable DC, QC, PD powered soldering irons, and supports all standard functions of smart soldering irons
搭建云计算平台(云计算管理平台搭建)
1个月写900多条用例,2线城市年薪33W+的测试经理能有多卷?
HashCode technology insider interview must ask
比对软件-blastN结果详解
使用Canvas 实现手机端签名
MySQL可以做多台vps的双向同步吗?
华盛顿大学、Allen AI 等联合 | RealTime QA: What's the Answer Right Now?(实时 QA:现在的答案是什么?)
PAT 甲级 A1003 Emergency
Spark: Cluster Computing with Working Sets
便携烙铁开源系统IronOS,支持多款便携DC, QC, PD供电烙铁,支持所有智能烙铁标准功能
14年测试人最近的面试经历,值得借鉴√