In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "the process of building a greenplum cluster". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "the process of building a greenplum cluster"!
Environment description
There are four virtual machines in this environment, one is master, three are segment nodes, and the segment3 node is standby master. Hostname: gpms,gps1,gps2,gps3
Version information, redhat7.3+gp5.16
Preliminary preparation-system parameters cat / etc/sysctl.conf#add by xyy for greenplum 20181016kernel.shmmax = 500000000kernel.shmmni = 4096kernel.shmall = 4000000000kernel.sem = 1024000 4096kernel.sysrq = 1kernel.core_uses_pid = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.msgmni = 2048net.ipv4.tcp_syncookies = 1net.ipv4.conf.default.accept_source_route = 0net.ipv4.tcp_tw_recycle = 1net.ipv4.tcp_max_syn_backlog = 4096net.ipv4.conf.all.arp _ Filter = 1net.ipv4.ip_local_port_range = 10000 65535net.core.netdev_max_backlog = 10000net.core.rmem_max = 2097152net.core.wmem_max = 2097152vm.overcommit_memory = 2vm.overcommit_memory = 2vm.swappiness = 10vm.dirty_expire_centisecs = 500vm.dirty_writeback_centisecs = 100vm.dirty_background_ratio = 0vm.dirty_ratio=0vm.dirty_background_bytes = 1610612736vm.dirty_bytes = 4294967296EOFUE-Resource restrictions vi / etc/security/limits.conf* soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072 * soft core unlimited create users Catalogue, etc. Each node requires groupdel gpadminuserdel gpadmingroupadd-g 530 gpadminuseradd-g 530-u 530-m color d / home/gpadmin-s / bin/bash gpadminchown-R gpadmin:gpadmin / home/gpadminpasswd gpadminmkdir / opt/greenplumchown-R gpadmin:gpadmin / opt/greenplum--hosts192.168.80.161 gpms192.168.80.162 gps1192.168.80.163 gps2192.168.80.164 gps3master node to install su-gpadmin/opt/greenplum/greenplum-db./greenplum-db-5.16.0-rhel7-x86 _ 64.binsource / opt/greenplum/greenplum-db/greenplum_path.sh [gpadmin@gptest conf] $pwd/home/gpadmin/conf [gpadmin@gptest conf] $cat hostlist gpmsgps1gps2gps3 [gpadmin@gptest conf] $cat seg_hosts gps1gps2gps3 [gpadmin@gptest conf] $configuration mutual trust Batch packaging and decompression-- ssh gpssh-exkeys-f hostlist-- batch operation command gpssh- f hostlist-- package tar-cvf gp5.6.tar greenplum-db-5.16.0/ gpscp-f / home/gpadmin/conf/seg_hosts gp5.6.tar =: / opt/greenplum/ gpssh- f seg_hosts cd / opt/gr* tar-xvf gp5.6.tar ln-s greenplum-db-5.16.0 greenplum-db--create relevant directories Gpssh-f hostlistmkdir-p / home/gpadmin/gpdata/gpmastermkdir-p / home/gpadmin/gpdata/gpdatap1mkdir-p / home/gpadmin/gpdata/gpdatap2mkdir-p / home/gpadmin/gpdata/gpdatam1mkdir-p / home/gpadmin/gpdata/gpdatam2-- configure environment variable echo "source / opt/greenplum/greenplum-db/greenplum_path.sh" > > / home/gpadmin/.bash_profile echo "export MASTER_DATA_DIRECTORY=/home/gpadmin/gpdata/gpmaster/gpseg-1" > > / home/gpadmin/.bash_ Profile echo "export PGPORT=2345" > > / home/gpadmin/.bash_profile echo "export PGDATABASE=testdb" > / home/gpadmin/.bash_profile database initialization cd / opt/greenplum/greenplum-db/docs/cli_help/ gpconfigs [gpadmin @ gptest conf] $vi gpinitsystem_config [gpadmin@gptest conf] $cat gpinitsystem_config | grep-v'#'| grep-v'^ $'ARRAY_NAME= "Greenplum Data Platform" # data node name prefix SEG_PREFIX=gpseg#primary starting port number PORT_BASE=33000 # primary data directory declare-a DATA_DIRECTORY= (/ home/gpadmin/gpdata/gpdatap1 / home/gpadmin/gpdata/gpdatap2) # host MASTER_HOSTNAME=gpms#master data directory MASTER_DIRECTORY=/home/gpadmin/gpdata/gpmasterMASTER_PORT=2345TRUSTED_SHELL=/usr/bin/sshCHECK_POINT_SEGMENTS=8ENCODING=UNICODE#mirror starting port number MIRROR_PORT_BASE=43000#primary segment primary / standby synchronization starting port number REPLICATION_PORT_BASE=34000#mirror segment primary / standby synchronization starting port number MIRROR_REPLICATION_PORT_BASE=44000 # mirror segment data directory declare-a MIRROR_DATA_DIRECTORY= (/ home/gpadmin/gpdata/gpdatam1 / home/gpadmin/gpdata/gpdatam2)-- initialize database gpinitsystem-c gpinitsystem_config-h seg_hosts-s gps3-S and other operation commands reference-- createselect * from pg_filespace Create tablespace tbs_siling filespace siling_fs;select a.spcname from pg_tablespace b.fsname b where spcfsoid=b.oid; create the database and user and authorize create database testdb tablespace tbs_siling;;create user testuser password 'testuser';grant all on database testdb to testuser;select rolname,oid from pg_roles;-- to set the user's tablespace and authorization alter user testuser set default_tablespace='tbs_siling';grant all on tablespace tbs_siling to testuser -- create schema and authorize create schema siling_mode;grant all on schema siling_mode to testuser;-- to start and stop database gpstart-agpstop-Amure-remotely connect to database-modify password alter role gpadmin with password 'gpadmin' Host all all 192.168.80.0 md5gpstop-upsql-h 192.168.80.161-d testdb-p 2345--greenplum data is distributed on all segment. When querying data, the data displayed by master is in the order of data received within the time limit, and the order in which the data of each segment arrives at master is random. So the select sequence is also random. Select gp_segment_id, count (*) from test2020 group by gp_segment_id;-- Cluster Node Distribution mode:s means synchronized, r resynchronized, c out of sync. Status:u up d downselect * from gp_segment_configuration; so far, I believe you have a deeper understanding of "the process of building a greenplum cluster". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.