HAWQ安装方式之RPM包安装

假设HAWQ集群安装在hawq1、hawq2、hawq3三台主机上。
一、系统环境准备(集群中每台机器都要做)
1. 关闭防火墙及其自动运行
centOS7 下
关闭防火墙:systemctl stop firewalld
关闭防火墙自动运行:systemctl disable firewalld
2. 修改/etc/sysctl.conf
kernel.shmmax = 1000000000
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 = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 200000
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1281 65535
net.core.netdev_max_backlog = 200000
vm.overcommit_memory = 2
fs.nr_open = 3000000
kernel.threads-max = 798720
kernel.pid_max = 798720
increase network
net.core.rmem_max=2097152
net.core.wmem_max=2097152
使修改配置立即生效:sysctl -p
3.修改vim /etc/security/limits.conf
* soft nofile 2900000
* hard nofile 2900000
* soft nproc 131072
* hard nproc 131072
4.安装依赖包

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
yum makecache
yum install -y man passwd sudo tar which git mlocate links make bzip2 net-tools \
  autoconf automake libtool m4 gcc gcc-c++ gdb bison flex gperf maven indent \
  libuuid-devel krb5-devel libgsasl-devel expat-devel libxml2-devel \
  perl-ExtUtils-Embed pam-devel python-devel libcurl-devel snappy-devel \
  thrift-devel libyaml-devel libevent-devel bzip2-devel openssl-devel \
  openldap-devel protobuf-devel readline-devel net-snmp-devel apr-devel \
  libesmtp-devel python-pip json-c-devel \
  java-1.7.0-openjdk-devel lcov cmake3 \
  openssh-clients openssh-server perl-JSON perl-Env
注意:若yum在线安装不成功,则可以通过配置阿里云的yum源,然后再下载

5.HAWQ是基于hadoop的,在安装HAWQ前确保已经安装好了hadoop集群。

二、安装HAWQ集群
1. 下载hawq rpm包
wget http://mirrors.hust.edu.cn/apache/incubator/hawq/2.2.0.0-incubating/apache-hawq-rpm-2.2.0.0-incubating.tar.gz
2. 解压hawq,安装hawq二进制rpm( 该步骤其它机器上也要执行
tar xvf apache-hawq-rpm-2.2.0.0-incubating.tar.gz
进入解压目录,执行如下命令:
rpm -ivh apache-hawq-2.2.0.0-el7.x86_64.rpm
3. 切换到gpadmin用户
su - gpadmin
4. 配置hawq
1)、修改 hawq-site.xml
修改hdfs访问路径,及数据文件路径hawq_master_directory、hawq_segment_directory
2)、修改slaves
vim slaves
hawq1
hawq2
hawq3
5.配置gpadmin用户免密登录
修改集群中所有gpadmin用户的密码
source greenplum_path.sh
hawq ssh-exkeys -h hawq1 -h hawq2-h hawq3(执行该命令后需要输入gpadmin用户的密码)
6. 初始化hawq cluster,修改数据文件路径
hawq init cluster
7.添加访问ip 为trust
修改hawq_master_directory下面的pg_hba.conf
host all gpadmin 192.168.10.10/24 trust
8. 远程使用gpadmin用户访问postgres数据库验证是否可连接



你可能感兴趣的:(HAWQ,大数据)