Install greenplum cluster on Ubuntu 16.04

Source: Internet
Author: User


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

2. Configure/etc/hosts

Edit the/etc/hosts file and make sure this it includes the host names and all interface address names for every machine p Articipating 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 100 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 read-ahead block size

/sbin/blockdev--setra 16384 /DEV/SDA

7. Restart the system

8, Installation 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. Initializing Environment variables

$ su Root

$ source/opt/gpdb/greenplum_path.sh

10. Create a host file all_hosts

$ VI all_hosts

IfreBigData1

IfreBigData2

IfreBigData4

11. Run Gpseginstall Tool

$ gpseginstall-f all_hosts-u gpadmin-p gpadmin

It's possible to avoid a secret failure.

20171215:08:55:57:054683 gpseginstall:ifrebigdata1:root-[info]:-exchange ssh keys for user root

20171215:08:55:57:054683 gpseginstall:ifrebigdata1:root-[info]:-cmd ' Gpssh-exkeys-f all_hosts ' failed with error code 1

20171215:08:55:57:054683 Gpseginstall:ifrebigdata1:root-[info]:-gppsh-exkeys failed running from within Pexpect ... Now try outside of Pexpect

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

Traceback (most recent):

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

(primary, aliases, Ipaddrs) = SOCKET.GETHOSTBYADDR (hostname)

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

20171215:08:55:58:054683 Gpseginstall:ifrebigdata1:root-[error]:-error on Cmd:gpssh-exkeys-f all_hosts

Workaround

$su Gpadmin

$source/opt/gpdb/greenplum_path.sh

$gpssh-exkeys-f all_hosts

12. Verify installation and password-free login

$ gpssh-f all_hosts-e ls $GPHOME

13. Add source/opt/gpdb/greenplum_path.sh to the. bashrc file at the end (all nodes are to be done)

14. Create a storage area

A) Create a master data storage area

Mkdir-p/data/master

b) Change of directory ownership

Chown Gpadmin/data/master

c) Create a file containing all segment hosts Seg_hosts

d) root user creates master and mirror data directories on the segment host with the Gpssh tool

$ 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. Synchronization System Time

Installing NTP on each machine

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

B. Modifying/etc/ntp.conf additions

Server Masterhostname

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

16. Verify Operating system settings

#gpcheck-F/data/all_hosts-m ifreBigData1

17. Initializing 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

Check Results

b) Setting environment variables

Add to

Export Master_data_directory=/data/master/ifreseg-1

To Master's ~/.BASHRC

Do the same on the segment machine

18. Start Stop Database

$ gpstart

$gpstop

Verify

$ psql-d template1


Install greenplum cluster on Ubuntu 16.04

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.