Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Actual combat: Install greenplum cluster on ubuntu 16.04

2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Planning: 1 msater, 2 segments

Environment: ubuntu 16.04

Greenplum Version: 'postgres (Greenplum Database) 5.3.0 build 2155c5a-oss

1. Installation

Sudo add-apt-repository ppa:greenplum/db

Sudo apt-get update

Sudo apt-get install greenplum-db-oss

two。 Configuration / etc/hosts

Edit the / etc/hosts file and make sure that it includes the host names and all interface address names for every machine participating in your Greenplum Database system.

3. Turn off the firewall

Service iptables stop

4. Modify / etc/sysctl.conf, add

Kernel.shmmax = 500000000

Kernel.shmmni = 4096

Kernel.shmall = 4000000000

Kernel.sem = 250 512000 2048

Kernel.sysrq = 1

Kernel.core_uses_pid = 1

Kernel.msgmnb = 65536

Kernel.msgmax = 65536

Kernel.msgmni = 2048

Net.ipv4.tcp_syncookies = 1

Net.ipv4.conf.default.accept_source_route = 0

Net.ipv4.tcp_tw_recycle = 1

Net.ipv4.tcp_max_syn_backlog = 4096

Net.ipv4.conf.all.arp_filter = 1

Net.ipv4.ip_forward=0

Net.ipv4.ip_local_port_range = 1025 65535

Net.core.netdev_max_backlog = 10000

Net.core.rmem_max = 2097152

Net.core.wmem_max = 2097152

Vm.overcommit_memory = 2

5. Configure / etc/security/limits.conf, add

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

6. Set the pre-read block size

/ sbin/blockdev-- setra 16384 / dev/sda

7. Restart the system

8. Install greenplum

Http://greenplum.org/install-greenplum-oss-on-ubuntu/

Https://launchpad.net/~greenplum/+archive/ubuntu/db

Installation into / opt/gpdb

-

Sudo apt-get install-y software-properties-common

Sudo add-apt-repository ppa:greenplum/db

Sudo apt-get update

Sudo apt-get install-y greenplum-db-oss

9. Initialize environment variables

$su root

$source / opt/gpdb/greenplum_path.sh

10. Create the host file all_hosts

$vi all_hosts

IfreBigData1

IfreBigData2

IfreBigData4

11. Run gpseginstall tool

$gpseginstall-f all_hosts-u gpadmin-p gpadmin

It is possible to fail to keep secret.

20171215 gpseginstall:ifreBigData1:root- 08808 exchange ssh keys for user root 555140514683:-exchange ssh keys for user root

20171215 gpssh-exkeys 08 all_hosts' failed with error code 55 552 gpseginstall:ifreBigData1:root- [INFO]:-Cmd 'gpssh-exkeys-f all_hosts' failed with error code 1

20171215 gpseginstall:ifreBigData1:root- 0858 gpseginstall:ifreBigData1:root- 55515 gppsh-exkeys failed running from within pexpect 545683. Now try outside of pexpect

Problem getting hostname for ifreBigData1: [Errno 0] Resolver Error 0 (no error)

Traceback (most recent call last):

File "/ opt/gpdb/bin/gpssh-exkeys", line 534, in

(primary, aliases, ipaddrs) = socket.gethostbyaddr (hostname)

Socket.herror: [Errno 0] Resolver Error 0 (no error)

20171215 gpseginstall:ifreBigData1:root- 0858 gpseginstall:ifreBigData1:root- [ERROR]: error on cmd: gpssh-exkeys-f all_hosts

Solution method

$su gpadmin

$source / opt/gpdb/greenplum_path.sh

$gpssh-exkeys-f all_hosts

twelve。 Verify installation and password-free login

$gpssh-f all_hosts-e ls $GPHOME

13. Add source / opt/gpdb/greenplum_path.sh to the end of the .bashrc file (all nodes do)

Create a storage area

A) create a Master data storage area

Mkdir-p / data/master

B) change the ownership of the directory

Chown gpadmin / data/master

C) create a file seg_hosts that contains all segment hosts

D) root users use gpssh tools to create master and mirror data directories on segment hosts

$su root

$source / opt/gpdb/greenplum_path.sh

$gpssh-exkeys-f all_hosts

Gpssh-f seg_hosts-e'mkdir-p / data/primary'

Gpssh-f seg_hosts-e'mkdir-p / data/mirror'

Gpssh-f seg_hosts-e'chown gpadmin / data/primary'

Gpssh-f seg_hosts-e'chown gpadmin / data/mirror'

15. Synchronize system time

Install ntp on each machine

A.gpssh-f all_hosts-e'apt install-y ntp'

b. Modify / etc/ntp.conf add

Server masterhostname

C.gpssh-f / data/all_hosts-e 'ntpd'

16. Verify operating system settings

# gpcheck-f / data/all_hosts-m ifreBigData1

17. Initialize GP database system

# su-gpadmin

$cp / opt/gpdb/docs/cli_help/gpconfigs/gpinitsystem_config ~ / gpinitsystem_config

$chmod 775 gpinitsystem_config

$vi gpinitsystem_config

ARRAY_NAME= "Greenplum Data Platform"

SEG_PREFIX=ifreseg

PORT_BASE=40000

Declare-a DATA_DIRECTORY= (/ data/primary)

MASTER_HOSTNAME=ifreBigData1

MASTER_DIRECTORY=/data/master

MASTER_PORT=5432

# OPTIONAL MIRROR PARAMETERS

MIRROR_PORT_BASE=50000

REPLICATION_PORT_BASE=41000

MIRROR_REPLICATION_PORT_BASE=51000

Declare-a MIRROR_DATA_DIRECTORY= (/ data/mirror)

A) run the initialization tool

$cp / data/seg_hosts ~

$gpinitsystem-c gpinitsystem_config-h seg_hosts

Examination result

B) set environment variables

Add

Export MASTER_DATA_DIRECTORY=/data/master/ifreseg-1

To the master ~ / .bashrc

Do the same thing on the segment machine

18. Start and stop the database

$gpstart

$gpstop

Verification

$psql-d template1

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report