如何访问自己做的网站,浙江有限公司网站,住房和创新建设部网站,推广网站seo安装 Doris#xff0c;需要先通过源码编译#xff0c;主要有两种方式#xff1a; 使用 Docker 开发镜像编译#xff08;推荐#xff09;、直接编译。 直接编译的方式#xff0c;可以参考官网#xff1a;https://doris.apache.org/zh-CN/installing/compilation.html
…安装 Doris需要先通过源码编译主要有两种方式 使用 Docker 开发镜像编译推荐、直接编译。 直接编译的方式可以参考官网https://doris.apache.org/zh-CN/installing/compilation.html
安装 Docker 环境
参考 安装 Docker 环境
使用 Docker 开发镜像编译
1下载源码并解压
通过 wget 下载或者手动上传下载好的压缩包链接具有时效性可能过期建议手动上传下载好的。
wget https://dist.apache.org/repos/dist/dev/incubator/doris/0.15/0.15.0-rc04/apache-doris-0.15.0-incubating-src.tar.gz
解压到/opt/software/ tar -zxvf apache-doris-0.15.0-incubating-src.tar.gz -C/opt/software 2下载 Docker 镜像 docker pull apache/incubator-doris:build-env-for-0.15.0 可以通过以下命令查看镜像是否下载完成。 docker images 3挂载本地目录运行镜像
以挂载本地 Doris 源码目录的方式运行镜像这样编译的产出二进制文件会存储在宿主机中不会因为镜像退出而消失。同时将镜像中 maven 的 .m2 目录挂载到宿主机目录以防止每次启动镜像编译时重复下载 maven 的依赖库。
docker run -it \
-v /opt/software/.m2:/root/.m2 \
-v /opt/software/apache-doris-0.15.0-incubating-src/:/root/apache-doris-0.15.0-incubating-src/ \
apache/incubator-doris:build-env-for-0.15.04切换到 JDK 8
alternatives --set java java-1.8.0-openjdk.x86_64
alternatives --set javac java-1.8.0-openjdk.x86_64
export JAVA_HOME/usr/lib/jvm/java-1.8.05准备 Maven 依赖
编译过程会下载很多依赖可以将我们准备好的 doris-repo.tar.gz 解压到 Docker 挂载的对应目录来避免下载依赖的过程加速编译。 tar -zxvf doris-repo.tar.gz -C /opt/software 也可以通过指定阿里云镜像仓库来加速下载 vim /opt/software/apache-doris-0.15.0-incubating-src/fe/pom.xml 在repositories标签下添加
repositoryidaliyun/id
urlhttp://maven.aliyun.com/nexus/content/groups/public//url
/repositoryvim /opt/software/apache-doris-0.15.0-incubating-src/be/pom.xml 在repositories标签下添加
repositoryidaliyun/id
urlhttp://maven.aliyun.com/nexus/content/groups/public//url
/repository6编译 Doris sh build.sh 如果是第一次使用 build-env-for-0.15.0 或之后的版本第一次编译的时候要使用如下命令 sh build.sh --clean --be --fe --ui 因为 build-env-for-0.15.0 版本镜像升级了 thrift(0.9 - 0.13)需要通过--clean 命令强制使用新版本的 thrift 生成代码文件否则会出现不兼容的代码。