greenplum6.0安装

  1. 集群环境配置

    1. 修改每台机器的配置
      1. 修改文件/etc/sysctl.conf
      2. 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_local_port_range = 10000 65535
        net.core.netdev_max_backlog = 10000
        net.core.rmem_max = 2097152
        net.core.wmem_max = 2097152
        vm.overcommit_memory = 2

         

      3. 修改/etc/security/limits.conf
      4. * soft nofile 65535
        * hard nofile 65535
        * soft nproc 131072
        * hard nproc 131072

         

      5. 创建Greenplume账户

        1. groupadd gpadmin

        2. useradd gpadmin -g gpadmin

        3. passwd gpadmin

      6. 配置生效:sysctl -p

  2. 安装gp

    1. 下载安装包:wget https://github.com/greenplum-db/gpdb/releases/download/6.0.0/greenplum-db-6.0.0-rhel7-x86_64.rpm
    2. 安装:rpm -Uvh greenplum-db-6.0.0-rhel7-x86_64.rpm
    3. 设置环境变量(root),在master节点执行:source /usr/local/greenplum-db/greenplum_path.sh
    4. 设置免密登录(每台机器)
      1. 生成密钥:ssh-keygen -t rsa
      2. 将公钥发送到要访问的机器(master->server):ssh-copy-id gpadmin@xxx
    5. 传输程序包(master节点):scp -r greenplum-db gpadmin@xxx:/home/gpadmin/
    6. 将程序移动到/user/locla下:mv greenplum-db/ /usr/local/
    7. 检查:安装的Greenplum(master节点):gpssh -f hostfile_exkeys -e ls -l $GPHOME
    8. 复制配置文件(master节点):cp /usr/local/greenplum-db/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/
    9. 修改配置文件(master 2个节点)
      1. mkdir -p /mnt/data/greenplum/master
      2. mkdir -p greenplum/master
      3. chown -R gpadmin:gpadmin master
    10. 创建存储目录(每台机器):
      1. mkdir -p /mnt/data/greenplum/data/primary
      2. mkdir /mnt/data/greenplum/data/mirror
      3. chown -R gpadmin:gpadmin greenplum
    11. 环境变量(.bashrc)greenplum6.0安装_第1张图片
    12. 初始化数据库(master):
      1. gpinitsystem -c gpconfigs/gpinitsystem_config -h gpconfigs/seg_host --mirror-mode=spread

 

 

 

 

 

你可能感兴趣的:(greenplum)