ITPub博客

首页 > Linux操作系统 > Linux操作系统 > greenplumn安装

greenplumn安装

原创 Linux操作系统 作者:zhouwf0726 时间:2018-12-11 15:36:03 0 删除 编辑
##--主节点:--##  
[gpadmin@ORA-TEST-03 ~]$ hostname
ORA-TEST-03 
[root@ORA-TEST-03 local]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
172.28.8.110    ORA-TEST-03
172.28.8.146    ORA-TEST-01
172.28.8.147    ORA-TEST-02
##--segment节点:--##
[root@ORA-TEST-01 /]# hostname
ORA-TEST-01
[root@ORA-TEST-02 ~]# hostname
ORA-TEST-02 
 
##--系统参数设置:--##
[root@ORA-TEST-03 tmp]# sysctl -a
kernel.shmmni = 4096
kernel.shmall = 33554432
kernel.shmmax = 137438953472
kernel.sem = 250 64000 100 512
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_max_syn_backlog=4096
net.core.netdev_max_backlog=10000
net.ipv4.conf.default.arp_filter=1
net.ipv4.conf.all.arp_filter=1
vm.overcommit_memory=2
[root@ORA-TEST-03 tmp]# cat /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
    
##--主节点root用户安装软件(官网只找个这个版本):--##    
[root@ORA-TEST-03 tmp]# ./greenplum-db-4.0.4.0-build-3-SingleNodeEdition-RHEL5-x86_64.bin
##--创建主节点group和user:--##
[root@ORA-TEST-03 local]# groupadd gpadmin
[root@ORA-TEST-03 local]# useradd -g gpadmin gpadmin
[root@ORA-TEST-03 local]# passwd gpadmin
[root@ORA-TEST-03 local]# chown gpadmin:gpadmin /usr/local/greenplum-db
##--创建两个host文件:--##
[root@ORA-TEST-03 gpadmin]# echo source /usr/local/greenplum-db/greenplum_path.sh >> ~/.bashrc
[root@ORA-TEST-03 gpadmin]# echo source /usr/local/greenplum-db/greenplum_path.sh >> /home/gpadmin/.bashrc    
[root@ORA-TEST-03 gpadmin]# . ./.bashrc    
[root@ORA-TEST-03 gpadmin]# pwd
/home/gpadmin
[root@ORA-TEST-03 gpadmin]# touch host-main
[root@ORA-TEST-03 gpadmin]# touch host-seg   
[root@ORA-TEST-03 gpadmin]# more host-main
ORA-TEST-03
ORA-TEST-01
ORA-TEST-02
[root@ORA-TEST-03 gpadmin]# more host-seg
ORA-TEST-01
ORA-TEST-02
##--配置root等效验证:--##
[root@ORA-TEST-03 gpadmin]# gpssh-exkeys -f host-main
##--创建segment节点group和user:--##
[root@ORA-TEST-03 gpadmin]# gpssh -f host-seg '/usr/sbin/groupadd gpadmin'
[root@ORA-TEST-03 gpadmin]# gpssh -f host-seg '/usr/sbin/useradd -g gpadmin gpadmin -d /home/gpadmin -s /bin/bash'
[root@ORA-TEST-03 gpadmin]# gpssh -f host-main 'echo gpadmin | passwd gpadmin --stdin'
[root@ORA-TEST-03 gpadmin]# gpssh -f host-main -v ntpd
[root@ORA-TEST-03 gpadmin]# gpssh -f host-main -v date
##--segment节点root用户安装软件:--##
[root@ORA-TEST-03 gpadmin]# cd /usr/local
[root@ORA-TEST-03 local]# gtar -cvf /home/gpadmin/gp.tar greenplum-db-4.0.4.0/
[root@ORA-TEST-03 gpadmin]# gpscp -f /home/gpadmin/host-seg /home/gpadmin/gp.tar =:/usr/local
[root@ORA-TEST-03 gpadmin]# gpssh -f /home/gpadmin/host-seg
=> gtar --directory /usr/local -xvf /usr/local/gp.tar
=> ls /usr/local/greenplum-db-4.0.4.0
=> ln -s /usr/local/greenplum-db-4.0.4.0 -f /usr/local/greenplum-db
=> rm /usr/local/gp.tar (没有反应,手工删除)
=> exit
##--创建主节点和segment节点目录:--##
[root@ORA-TEST-03 local]# mkdir /gpmaster
[root@ORA-TEST-03 local]# chown -R gpadmin:gpadmin /gpmaster
[root@ORA-TEST-03 gpadmin]# gpssh -f /home/gpadmin/host-seg
=> mkdir /gpdata1
=> mkdir /gpdata2
=> chown -R gpadmin:gpadmin /gpdata1
=> chown -R gpadmin:gpadmin /gpdata2
##--配置gpadmin等效验证:--##
[root@ORA-TEST-03 gpadmin]# su - gpadmin
[gpadmin@ORA-TEST-03 ~]$ gpssh-exkeys -f /home/gpadmin/host-main
[gpadmin@ORA-TEST-03 ~]$ gpcheck -f /home/gpadmin/host-main -m ORA-TEST-03
[gpadmin@ORA-TEST-03 ~]$ gpcheckos -f /home/gpadmin/host-main
[gpadmin@ORA-TEST-03 ~]$ gpcheckperf -f /home/gpadmin/host-main -r N -d /tmp
##--读写性能测试比较慢,可以不执行:--##
[gpadmin@ORA-TEST-03 ~]$ gpcheckperf -f /home/gpadmin/host-seg -r ds -D -d /gpdata1 -d /gpdata2
[gpadmin@ORA-TEST-03 ~]$ gpcheckperf -h ORA-TEST-01 -h ORA-TEST-02 -d /gpdata1 -d /gpdata2 -r d -D -v
##--初始化gp数据库:--##
[gpadmin@ORA-TEST-03 ~]$ cp $GPHOME/docs/cli_help/gp_init_config_example /home/gpadmin/gp_init_config
[gpadmin@ORA-TEST-03 ~]$ vi /home/gpadmin/gp_init_config
  declare -a DATA_DIRECTORY=(/gpdata1 /gpdata2)
  MASTER_HOSTNAME=ORA-TEST-03
  MASTER_DIRECTORY=/gpmaster
  DATABASE_NAME=mytest
  MACHINE_LIST_FILE=/home/gpadmin/host-seg
[gpadmin@ORA-TEST-03 ~]$ gpinitsystem -c /home/gpadmin/gp_init_config
[gpadmin@ORA-TEST-03 ~]$ echo export MASTER_DATA_DIRECTORY=/gpmaster/gpseg-1 >> .bashrc
##--配置gpperfmon:--##
[gpadmin@ORA-TEST-03 ~]$ gpperfmon_install --enable --password gpadmin --port 5432
[gpadmin@ORA-TEST-03 ~]$ gpstop
[gpadmin@ORA-TEST-03 ~]$ gpstart
[gpadmin@ORA-TEST-03 ~]$ ps -ef | grep gpmmon
[gpadmin@ORA-TEST-03 ~]$ psql gpperfmon -c 'SELECT * FROM system_now;'
##--配置客户端认证:--##
[gpadmin@ORA-TEST-03 ~]$ vi $MASTER_DATA_DIRECTORY/pg_hba.conf
host     all         gpadmin         0.0.0.0/0      trust
host     all         gpmon           0.0.0.0/0      md5
host    all         all             172.28.11.0/24 password
##--配置性能监控,参考文档install greenplum monitor.pdf:--##
[gpadmin@ORA-TEST-03 ~]$ su - root
[root@ORA-TEST-03 tmp]# unzip greenplum-perfmon-web-4.0.4.0-build-3-RHEL5-x86_64.zip
[root@ORA-TEST-03 tmp]# ./greenplum-perfmon-web-4.0.4.0-build-3-RHEL5-x86_64.bin
[root@ORA-TEST-03 greenplum-perfmon-web-4.0.4.0-build-3]# chown -R gpadmin:gpadmin /usr/local/greenplum-perfmon-web-4.0.4.0-build-3/
[gpadmin@ORA-TEST-03 ~]$ vi /home/gpadmin/gp_init_config
  gp_enable_gpperfmon=on
  gpperfmon_port=8888
  gp_external_enable_exec=on
[root@ORA-TEST-03 greenplum-perfmon-web-4.0.4.0-build-3]# su - gpadmin
[gpadmin@ORA-TEST-03 ~]$ echo source /usr/local/greenplum-perfmon-web-4.0.4.0-build-3/gpperfmon_path.sh >> ~/.bashrc
[gpadmin@ORA-TEST-03 ~]$ gpperfmon --setup
instance name : gpmon
gpperfmon --start gpmon
http://172.28.8.110:28080/    userid/password:gpmon/gpadmin

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/756652/viewspace-706392/,如需转载,请注明出处,否则将追究法律责任。

上一篇: oracle ops
请登录后发表评论 登录
全部评论

注册时间:2006-02-22

  • 博文量
    458
  • 访问量
    354921