1、准备类Unix环境(Linux, Mac OS X)
笔者在阿里云上申请了一台ECS,系统为CentOS 7.6 64位。
2、准备git环境
yum -y install git
3、Oracle Java 7 or 8
1)下载tar并解压
在window中下载jdk-8u202-linux-x64.tar.gz(下载地址为https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html),然后再上传到linux的/usr/local下(笔记使用winscp上传)。
解压命令:
tar -xzvf jdk-8u202-linux-x64.tar.gz
2)在/etc/profile中添加
export JAVA_HOME=/usr/local/jdk1.8.0_202
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin
- profile生效
source /etc/profile
- 检查java
java -version
4、Apache Maven (Recommend version 3.3 or later)
- 下载tar并解压到/usr/local/maven3
cd /usr/local/src/
wget http://mirrors.shu.edu.cn/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
tar -xzvf apache-maven-3.6.0-bin.tar.gz
mv apache-maven-3.6.0 /usr/local/maven3
2)在/etc/profile中添加
export M2_HOME=/usr/local/maven3
export PATH=$PATH:$M2_HOME/bin
- profile生效
source /etc/profile
4)检查mvn
mvn -v
5、Apache Thrift 0.9.3
1)安装依赖
yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl openssl-devel
- 安装boost
cd /usr/local
wget http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.gz
tar -xzvf boost_1_53_0.tar.gz
cd boost_1_53_0
./bootstrap.sh
sudo ./b2 install
ln -s /usr/local/lib/libboost_unit_test_framework.a /usr/local/lib64/libboost_unit_test_framework.a
- 安装thrift
cd /usr/local
wget http://archive.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
tar -xzvf thrift-0.9.3.tar.gz
cd thrift-0.9.3
./configure --with-boost=/usr/local --without-java --without-php
make && make install
- 查看是否安装成功
thrift -version
6、下载源代码和构建
- 使用root账号创建carbondata用户和修改密码
adduser carbondata
passwd carbondata
- 在carbondata用户目录下,执行
git clone https://github.com/apache/carbondata.git
cd carbondata
mvn -DskipTests -Pspark-2.2 -Dspark.version=2.2.1 clean package