当前位置:网站首页>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下载
完
边栏推荐
猜你喜欢

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

AI艺术‘美丑’不可控?试试 AI 美学评分器~

华盛顿大学、Allen AI 等联合 | RealTime QA: What's the Answer Right Now?(实时 QA:现在的答案是什么?)

27英寸横置大屏+实体按键,全新探险者才是安全而合理的做法!

今晚直播!

好家伙,公司服务器直接热崩掉了!

Using Canvas to achieve web page mouse signature effect

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

如何防止重复下单?

Rancher 部署 DataKit 最佳实践
随机推荐
【Unity,C#】哨兵点位循迹模板代码
全新升级!《云原生架构白皮书 2022 版》重磅发布
OpenCV-resize函数「建议收藏」
90后的焦虑,被菜市场治好了
搭建云计算平台(云计算管理平台搭建)
【无标题】
DOM series of touch screen events
Path helper class for C#
p5js炫酷网页流光动画
08 spark 集群搭建
提速!进口婴幼儿配方产品出证仅需1-3天
MUI as a mobile phone to return to the action bar
C#的CSV格式文件帮助类
MySQL【创建和管理表】
如何有效地开发 Jmix 扩展组件
Rancher 部署 DataKit 最佳实践
04 flink 集群搭建
便携烙铁开源系统IronOS,支持多款便携DC, QC, PD供电烙铁,支持所有智能烙铁标准功能
Slider/Carousel图片切换支持触摸屏
"Find nearby shops" | Geohash+MySQL realizes geographic location filtering