• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

Greenplum环境安装配置步骤

mysql 搞代码 4年前 (2022-01-09) 33次浏览 已收录 0个评论

1、环境准备服务器分配192.168.100.101–mdw192.168.100.11–smdw192.168.100.12–sdw1192.168.100.13–sdw2 ms1与ms2之间的心跳ip配置10.10.10.1–mdw10.10.10.2–smdw 2、修改hosts文件(所有主机hosts文件必须全部修改) vi /etc/hosts192.168.100.101 mdw1

1、环境准备服务器分配192.168.100.101–mdw192.168.100.11–smdw192.168.100.12–sdw1192.168.100.13–sdw2
ms1与ms2之间的心跳ip配置10.10.10.1–mdw10.10.10.2–smdw
2、修改hosts文件(所有主机hosts文件必须全部修改)
vi /etc/hosts192.168.100.101 mdw192.168.100.11 smdw192.168.100.12 sdw1192.168.100.13 sdw2
3、关闭iptables和selinux[root@mdw ~]# service iptables stop[root@mdw ~]#[root@mdw ~]#[root@mdw ~]#[root@mdw ~]#[root@mdw ~]# chkconfig iptables –listiptables 0:鍏抽棴 1:鍏抽棴 2:鍏抽棴 3:鍏抽棴 4:鍏抽棴 5:鍏抽棴 6:鍏抽棴[root@mdw ~]# export LANG=zh_CN[root@mdw ~]# chkconfig iptables –listiptables 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
[root@mdw ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing – SELinux security policy is enforced.# permissive – SELinux prints warnings instead of enforcing.# disabled – No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:# targeted – Targeted processes are protected,# mls – Multi Level Security protection.SELINUXTYPE=targeted
[root@mdw ~]# setenforce 0
4、修改系统参数1)vi /etc/sysctl.conf[root@mdw ~]# sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 1kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1error: “net.bridge.bridge-nf-call-ip6tables” is an unknown keyerror: “net.bridge.bridge-nf-call-iptables” is an unknown keyerror: “net.bridge.bridge-nf-call-arptables” is an unknown keykernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 68719476736kernel.shmall = 4294967296error: “kernel.msgmin” is an unknown keyvm.overcommit_memory = 2error: “net.ipv4.cp_tw_recycle” is an unknown keynet.ipv4.tcp_max_syn_backlog = 4096net.ipv4.conf.all.arp_filter = 1error: “Invalid argument” setting key “net.ipv4.ip_local_port_range”net.core.netdev_max_backlog = 10000error: “xfs_mount_options” is an unknown keykernel.shmmni = 4096kernel.sem = 250 512000 100 2048net.ipv4.tcp_tw_recycle = 1net.ipv4.conf.default.arp_filter = 1kernel.msgmni = 2048
2) vi /etc/security/limits.conf
* soft nofile 65536* hard nofile 65536* soft nproc 131072* hard nproc 131072
在RHEL6.x版本需要修改文件 /etc/security/limits.d/90-nproc.conf,增加如下内容:* softnproc 131072 * hardnproc 131072
4、修改完系统参数后重启服务器
5、创建gpadmin用户 useradd gpadmin6、安装GP 1) 上传安装文件解压缩 2)执行安装文件
[root@mdw GPDB]# ./greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.bin
I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE EMC SOFTWARELICENSE AGREEMENT.
********************************************************************************Do you accept the EMC Database license agreement? [yes|no]********************************************************************************
yes
********************************************************************************Provide the installation path for Greenplum Database or press ENTER toaccept the default installation path: /usr/local/greenplum-db-4.2.6.3********************************************************************************
/home/gpadmin/GPDB/install
********************************************************************************Install Greenplum Database into ? [yes|no]********************************************************************************
yes
********************************************************************************[Optional] Provide the path to a previous installation of Greenplum Database,or press ENTER to skip this step. e.g. /usr/local/greenplum-db-4.1.1.3
This installation step will migrate any Greenplum Database extensions from theprovided path to the version currently being installed. This step is optionaland can be run later with:gppkg –migrate /home/gpadmin/GPDB/install********************************************************************************
Extracting product to /home/gpadmin/GPDB/install
Skipping migration of Greenplum Database extensions…
************************* *******************************************************Installation complete.Greenplum Database is installed in /home/gpadmin/GPDB/install
Greenplum Database documentation is available for downloadat http://powerlink.emc.com.********************************************************************************[root@mdw GPDB]#
[root@mdw install]# source greenplum_path.sh[root@mdw install]#
3)准备allnotes文件[root@mdw install]# pwd/home/gpadmin/GPDB/install[root@mdw install]#[root@mdw install]#[root@mdw install]#[root@mdw install]# lsallnotes bin demo docs etc ext GPDB-LICENSE.txt greenplum_path.sh include lib LICENSE.thirdparty sbin share[root@mdw install]# cat allnotessdw1sdw2smdw
4)建立多机互信[root@mdw install]# gpssh-exkeys -f allnotes[STEP 1 of 5] create local ID and authorize on local host … /root/.ssh/id_rsa file exists … key generation skipped
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts … send to sdw1 … send to sdw2 *** *** Enter password for sdw2: … send to smdw
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts … finished key exchange with sdw1[ERROR] unable to copy authentication files to sdw2 lost connection[ERROR] unable to copy authentication files to smdw lost connection
上述报错解决办法:删除mdw /root/.ssh/目录下的内容 重新执行gpssh-exkeys -f allnotes
5)创建存放数据的目录
[root@mdw GPDB]# mkdir data[root@mdw GPDB]# mkdir data/master
[root@mdw GPDB]# chown gpadmin:gpadmin data -R[root@mdw GPDB]#[root@mdw GPDB]#[root@mdw GPDB]# ll鎬荤敤閲109588drwxr-xr-x 3 gpadmin gpadmin 4096 2鏈 20 16:21 datalrwxrwxrwx 1 root root 9 2鏈 20 16:02 greenplum-db -> ./install-rwxr-xr-x 1 root root 56782500 10鏈 8 06:45 greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.bin-rw-r–r– 1 root root 55417563 11鏈25 11:44 greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.zipdrwxr-xr-x 11 root root 4096 2鏈 20 16:04 install-r–r–r– 1 root root 6935 10鏈 8 06:45 README_INSTALL[root@mdw GPDB]#
6)其他机器安装GP [root@mdw install]# cat allsegsmdwsdw1sdw2
使用gpseginstall安装
[root@mdw install]# gpseginstall -f allseg -u gpadmin20140220:16:28:05:003251 gpseginstall:mdw:root-[INFO]:-Installation Info:link_name greenplum-dbbinary_path /home/gpadmin/GPDB/installbinary_dir_location /home/gpadmin/GPDBbinary_dir_name install20140220:16:28:05:003251 gpseginstall:mdw:root-[INFO]:-check cluster password access20140220:16:28:06:003251 gpseginstall:mdw:root-[INFO]:-de-duplicate hostnames20140220:16:28:06:003251 gpseginstall:mdw:root-[INFO]:-master hostname: mdw20140220:16:28:07:003251 gpseginstall:mdw:root-[INFO]:-check for user gpadmin on cluster20140220:16:28:07:003251 gpseginstall:mdw:root-[INFO]:-add user gpadmin on master20140220:16:28:08:003251 gpseginstall:mdw:root-[INFO]:-add user gpadmin on cluster20140220:16:28:08:003251 gpseginstall:mdw:root-[INFO]:-chown -R gpadmin:gpadmin /home/gpadmin/GPDB/greenplum-db20140220:16:28:08:003251 gpseginstall:mdw:root-[INFO]:-chown -R gpadmin:gpadmin /home/gpadmin/GPDB/install20140220:16:28:08:003251 gpseginstall:mdw:root-[INFO]:-rm -f /home/gpadmin/GPDB/install.tar; rm -f /home/gpadmin/GPDB/install.tar.gz20140220:16:28:08:003251 gpseginstall:mdw:root-[INFO]:-cd /home/gpadmin/GPDB; tar cf install.tar install20140220:16:28:09:003251 gpseginstall:mdw:root-[INFO]:-gzip /home/gpadmin/GPDB/install.tar20140220:16:28:22:003251 gpseginstall:mdw:root-[INFO]:-remote command: mkdir -p /home/gpadmin/GPDB20140220:16:28:22:003251 gpseginstall:mdw:root-[INFO]:-remote command: rm -rf /home/gpadmin/GPDB/install20140220:16:28:23:003251 gpseginstall:mdw:root-[INFO]:-scp software to remote location20140220:16:28:38:003251 gpseginstall:mdw:root-[INFO]:-remote command: gzip -f -d /home/gpadmin/GPDB/install.tar.gz20140220:16:28:40:003251 gpseginstall:mdw:root-[INFO]:-md5 check on remote location20140220:16:28:42:003251 gpseginstall:mdw:root-[INFO]:-remote command: cd /home/gpadmin/GPDB; tar xf install.tar20140220:16:28:43:003251 gpseginstall:mdw:root-[INFO]:-remote command: rm -f /home/gpadmin/GPDB/install.tar20140220:16:28:44:003251 gpseginstall:mdw:root-[INFO]:-remote command: cd /home/gpadmin/GPDB; rm -f greenplum-db; ln -fs install greenplum-db20140220:16:28:44:003251 gpseginstall:mdw:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /home/gpadmin/GPDB/greenplum-db20140220:16:28:45:003251 gpseginstall:mdw:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /home/gpadmin/GPDB/install20140220:16:28:45:003251 gpseginstall:mdw:root-[INFO]:-rm -f /home/gpadmin/GPDB/install.tar.gzPlease enter a password:Confirm password:20140220:16:29:19:003251 gpseginstall:mdw:root-[INFO]:-Changing system passwords …20140220:16:29:20:003251 gpseginstall:mdw:root-[INFO]:-exchange ssh keys for user root20140220:16:29:23:003251 gpseginstall:mdw:root-[INFO]:-exchange ssh keys for user gpadmin20140220:16:29:24:003251 gpseginstall:mdw:root-[INFO]:-Exception running cmd: su gpadmin -c “gpssh-exkeys -f allseg”20140220:16:29:24:003251 gpseginstall:mdw:root-[INFO]:-write() argument 2 must be string or buffer, not None20140220:16:29:24:003251 gpseginstall:mdw:root-[INFO]:-gppsh-exkeys failed running from within pexpect … now try outside of pexpect[STEP 1 of 5] create local ID and authorize on local host … /home/gpadmin/.ssh/id_rsa file exists … key generation skipped
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts … send to smdw *** *** Enter password for smdw: … send to sdw1 … s本文来源gao($daima.com搞@代@#码(网5end to sdw2
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts … finished key exchange with smdw … finished key exchange with sdw1 … finished key exchange with sdw2
[INFO] completed successfully20140220:16:29:31:003251 gpseginstall:mdw:root-[INFO]:-/home/gpadmin/GPDB/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin20140220:16:29:31:003251 gpseginstall:mdw:root-[INFO]:-remote command: . /home/gpadmin/GPDB/greenplum-db/./greenplum_path.sh; /home/gpadmin/GPDB/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin20140220:16:29:32:003251 gpseginstall:mdw:root-[INFO]:-version string on master: gpssh version 4.2.6.3 build 220140220:16:29:32:003251 gpseginstall:mdw:root-[INFO]:-remote command: . /home/gpadmin/GPDB/greenplum-db/./greenplum_path.sh; /home/gpadmin/GPDB/greenplum-db/./bin/gpssh –version20140220:16:29:33:003251 gpseginstall:mdw:root-[INFO]:-remote command: . /home/gpadmin/GPDB/install/greenplum_path.sh; /home/gpadmin/GPDB/install/bin/gpssh –version20140220:16:29:39:003251 gpseginstall:mdw:root-[INFO]:-SUCCESS — Requested commands completed
[root@mdw greenplum-db-4.2.6.3]# gpssh -f allnotes mkdir -p /data/d1 /data/d2 /data/m1 /data/m2[sdw1][sdw2][root@mdw greenplum-db-4.2.6.3]# gpssh -f allnotes chown gpadmin:gpadmin /data/d1 /data/d2 /data/m1 /data/m2 -R[sdw1][sdw2]
安装完成
7、数据库初始化
1)创建数据节点文件[root@mdw install]# cat notessdw1sdw22) 创建初始化参数文件[root@mdw install]# cat gpinitsystem_configARRAY_NAME=”Greenplum”SEG_PREFIX=gpsegPORT_BASE=50000declare -a DATA_DIRECTORY=(/home/gpadmin/GPDB/data/d1 /home/gpadmin/GPDB/data/d2)MASTER_HOSTNAME=mdwMASTER_DIRECTORY=/home/gpadmin/GPDB/data/masterMASTER_PORT=5432TRUSTED_SHELL=sshCHECK_POINT_SEGMENTS=8ENCODING=UNICODEMIRROR_PORT_BASE=60000REPLICATION_PORT_BASE=41000MIRROR_REPLICATION_PORT_BASE=51000declare -a MIRROR_DATA_DIRECTORY=(/home/gpadmin/GPDB/data/m1 /home/gpadmin/GPDB/data/m2)
3) 数据初始化
su – gpadmin
[gpadmin@mdw install]$ gpinitsystem -c gpinitsystem_config -h notes

vi .bashrc
#greenplumexport MASTER_DATA_DIRECTORY=/data/master/gpseg-1
vi $MASTER_DATA_DIRECTORY/pg_hba.conf
host all all 0/0 md5
3) 数据初始化
su – gpadmin
[gpadmin@mdw install]$ gpinitsystem -c gpinitsystem_config -h notes


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Greenplum环境安装配置步骤
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址