实战:Install greenplum cluster on ubuntu 16.04


规划:1个msater, 2个segments环境:ubuntu 16.04Greenplum Version: ‘postgres (Greenplum Database) 5.3.0 build 2155c5a-oss1、安装
sudo add-apt-repository ppa:greenplum/dbsudo apt-get updatesudo apt-get install greenplum-db-oss2. 配置/etc/hostsEdit 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、关闭防火墙service iptables stop4、修改/etc/sysctl.conf,添加kernel.shmmax = 500000000kernel.shmmni = 4096kernel.shmall = 4000000000kernel.sem = 250 512000 100 2048kernel.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_forward=0net.ipv4.ip_local_port_range = 1025 65535net.core.netdev_max_backlog = 10000net.core.rmem_max = 2097152net.core.wmem_max = 2097152vm.overcommit_memory = 25、配置 /etc/security/limits.conf,添加* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
6. 设置预读块大小/sbin/blockdev –setra 16384 /dev/sda7、重启系统8、安装greenplumhttp://greenplum.org/install-greenplum-oss-on-ubuntu/https://launchpad.net/~greenplum/+archive/ubuntu/dbInstallation into /opt/gpdb—————————sudo apt-get install -y software-properties-commonsudo add-apt-repository ppa:greenplum/dbsudo apt-get updatesudo apt-get install -y greenplum-db-oss9、初始化环境变量$ su root$ source /opt/gpdb/greenplum_path.sh10、创建主机文件 all_hosts$ vi all_hostsifreBigData1ifreBigData2ifreBigData411、运行gpseginstall工具$ gpseginstall -f all_hosts -u gpadmin-p gpadmin有可能免密失败20171215:08:55:57:054683 gpseginstall:ifreBigData1:root-[INFO]:-exchange ssh keys for user root20171215:08:55:57:054683 gpseginstall:ifreBigData1:root-[INFO]:-Cmd ‘gpssh-exkeys -f all_hosts’ failed with error code 120171215:08:55:57:054683 gpseginstall:ifreBigData1:root-[INFO]:-gppsh-exkeys failed running from within pexpect … now try outside of pexpectProblem 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:08:55:58:054683 gpseginstall:ifreBigData1:root-[ERROR]:-error on cm 香港云主机d: gpssh-exkeys -f all_hosts解决方法$su gpadmin$source /opt/gpdb/greenplum_path.sh$gpssh-exkeys -f all_hosts12.验证安装及免密登录$ gpssh -f all_hosts -e ls $GPHOME13. 将source /opt/gpdb/greenplum_path.sh添加到.bashrc文件最后(所有的节点都要做)14、创建存储区域a) 创建Master数据存储区域mkdir -p /data/masterb)改变目录所有权chown gpadmin /data/masterc)创建包含所有segment主机的文件seg_hostsd)root用户用gpssh 工具在segment主机上创建主数据和镜像数据目录$ su root$ source /opt/gpdb/greenplum_path.sh$ gpssh-exkeys -f all_hostsgpssh -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、同步系统时间在各个机器安装 ntpa.gpssh -f all_hosts -e ‘apt install -y ntp’b.修改/etc/ntp.conf添加server masterhostnamec.gpssh -f /data/all_hosts -e ‘ntpd’16、验证操作系统设置#gpcheck -f /data/all_hosts -m ifreBigData117、初始化GP数据库系统#su – gpadmin$ cp /opt/gpdb/docs/cli_help/gpconfigs/gpinitsystem_config ~/gpinitsystem_config$ chmod 775 gpinitsystem_config$ vi gpinitsystem_configARRAY_NAME=”Greenplum Data Platform”SEG_PREFIX=ifresegPORT_BASE=40000declare -a DATA_DIRECTORY=(/data/primary)MASTER_HOSTNAME=ifreBigData1MASTER_DIRECTORY=/data/masterMASTER_PORT=5432#### OPTIONAL MIRROR PARAMETERSMIRROR_PORT_BASE=50000REPLICATION_PORT_BASE=41000MIRROR_REPLICATION_PORT_BASE=51000declare -a MIRROR_DATA_DIRECTORY=(/data/mirror)a)运行初始化工具$ cp /data/seg_hosts ~$ gpinitsystem -c gpinitsystem_config -h seg_hosts检查结果b)设置环境变量添加export MASTER_DATA_DIRECTORY=/data/master/ifreseg-1到master 的~/.bashrc在segment机器上做同样的操作18、启动停止数据库$ gpstart$gpstop验证$ psql -d template1

相关推荐: 微信小程序如何进行微信支付

本篇内容介绍了“微信小程序如何进行微信支付”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!小程序支付步骤:1,预支付2,根据预支付数据+签名——>发起支付3…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 07/23 16:57
下一篇 07/23 16:57

相关推荐