HAWQ安装步骤

HAWQ安装步骤

# install document with yum
sed -i 's/tsflags=nodocs//g' /etc/yum.conf

# install jdk
yum install -y wget
# 没有安装包时取安装包
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.rpm
# 有安装包时
rpm -ivh jdk-8u66-linux-x64.rpm

# install all software we need
yum install -y epel-release && yum makecache && yum install -y man passwd sudo tar which git mlocate links make bzip2 autoconf automake libtool m4 gcc gcc-c++ gdb flex cmake gperf indent libuuid-devel krb5-devel libgsasl-devel expat-devel libxml2-devel perl-ExtUtils-Embed pam-devel python-devel snappy-devel libyaml-devel libevent-devel bzip2-devel openssl-devel openldap-devel readline-devel net-snmp-devel apr-devel libesmtp-devel xerces-c-devel python-pip json-c-devel apache-ivy java-1.7.0-openjdk-devel openssh-clients openssh-server && yum clean all

# install libcurl 7.45.0
mkdir -p /tmp/build/ && cd /tmp/build && curl -L "http://curl.haxx.se/download/curl-7.45.0.tar.bz2" -o curl-7.45.0.tar.bz2 && tar -xjf curl-7.45.0.tar.bz2 && cd curl-7.45.0 && ./configure --prefix=/usr && make && make install && cd && rm -rf /tmp/build && ldconfig

curl -L "http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo" -o /etc/yum.repos.d/epel-apache-maven.repo && yum install -y apache-maven && yum clean all

# setup ssh server and keys for root
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys

# setup JAVA_HOME for all users
echo "export JAVA_HOME=/usr/java/latest" >> /etc/profile.d/java.sh && chmod a+x /etc/profile.d/java.sh

# install boost 1.59
mkdir -p /tmp/build && cd /tmp/build && curl -L "http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2" -o boost_1_59_0.tar.bz2 && tar -xjf boost_1_59_0.tar.bz2 && cd boost_1_59_0 && ./bootstrap.sh && ./b2 --prefix=/usr -q && ./b2 --prefix=/usr -q install && cd && rm -rf /tmp/build

# install bison 2.5.1
mkdir -p /tmp/build/ && cd /tmp/build &&curl -L "ftp://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz" -o bison-2.5.1.tar.gz && tar -xzf bison-2.5.1.tar.gz && cd bison-2.5.1 && ./configure --prefix=/usr && make && make install && cd && rm -rf /tmp/build

# install thrift 0.9.2
mkdir -p /tmp/build && cd /tmp/build && curl -L "http://www.us.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz" -o thrift-0.9.2.tar.gz && tar -xzf thrift-0.9.2.tar.gz && cd thrift-0.9.2 && ./configure --prefix=/usr --with-cpp=yes --with-boost=yes --with-qt4=no --with-csharp=no --with-java=no --with-erlang=no --enable-tests=no --with-nodejs=no --with-lua=no --with-python=no --with-perl=no --with-php=no && make && make install && cd && rm -rf /tmp/build

# install protobuf 2.5.0 已FQ时运行
mkdir -p /tmp/build/ && cd /tmp/build && curl -L "https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" -o protobuf-2.5.0.tar.bz2 && tar -xjf protobuf-2.5.0.tar.bz2 && cd protobuf-2.5.0 && ./configure --prefix=/usr && make && make install && ldconfig && cd && rm -rf /tmp/build
# 不FQ取不到安装包,只能按照下面的方式安装
# FQ取回安装包,scp到/root下
cd /root && tar -xzvf protobuf-2.6.1.tar.gz && cd protobuf-2.6.1 && ./configure --prefix=/usr && make && make install && ldconfig

# install libhdfs3
mkdir -p /tmp/build && cd /tmp/build && git clone https://github.com/PivotalRD/libhdfs3.git . && mkdir build && cd build && ../bootstrap --prefix=/usr && make && make install && ldconfig && cd && rm -rf /tmp/build

# install python module
yum makecache && yum install -y postgresql-devel && pip --retries=50 --timeout=300 install pg8000 simplejson unittest2 pycrypto pygresql pyyaml lockfile paramiko psi && pip --retries=50 --timeout=300 install http://darcs.idyll.org/~t/projects/figleaf-0.6.1.tar.gz && pip --retries=50 --timeout=300 install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download && yum erase -y postgresql postgresql-libs postgresql-devel && yum clean all

# install libyarn
mkdir -p /tmp/build && cd /tmp/build && git clone --depth=1 https://github.com/apache/incubator-hawq.git . && cd depends/libyarn && mkdir build && cd build && ../bootstrap --prefix=/usr && make && make install && ldconfig

# install hawq
cd /tmp/build/
./configure --prefix=/usr/hawq
# 将license文字注释掉
vi src/include/nodes/plannerconfig.h
vi src/include/nodes/stack.h
vi src/include/catalog/gp_version.h
make && make install && source /usr/hawq/greenplum_path.sh && make unittest-check # && cd && rm -rf /tmp/build

# 下面的内容还没有搞定
# create user gpadmin since HAWQ cannot run under root
groupadd -g 1000 gpadmin && useradd -u 1000 -g 1000 gpadmin && echo "gpadmin ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/gpadmin
# sudo should not require tty
sed -i -e 's|Defaults requiretty|#Defaults requiretty|' /etc/sudoers

echo "export USER=\`whoami\`" >> /etc/profile.d/user.sh && chmod a+x /etc/profile.d/user.sh

# setup ssh client keys for gpadmin
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值