去掉两千行限制:
需要修改的文件:src\metabase\query_processor\middleware\constraints.clj
环境配置+编译代码
- 下载
centos8 docker
进行编译
root@ggy:~# docker pull centos
- 启动docker
root@ggy:~# docker run -it -p 3000:3000 --name metabse_compile -d centos /bin/bash
- 进入docker的bash
root@ggy:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
914bd1b3111c centos "/bin/bash" 2 minutes ago Up 2 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp metabse_compile
root@ggy:~# docker exec -it 914bd1b3111c bash
- 更新系统的源为阿里源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
sed -i -e "s|mirrors.cloud.aliyuncs.com|mirrors.aliyun.com|g " /etc/yum.repos.d/CentOS-*
sed -i -e "s|releasever|releasever-stream|g" /etc/yum.repos.d/CentOS-*
yum clean all && yum makecache
- 安装Git
yum install git -y
- 安装
lein
curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
mv lein /usr/local/bin/
export LEIN_HOME=/usr/local
export PATH=$PATH:$LEIN_HOME/bin
source /etc/profile
- 安装
Nodejs
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
nvm install 18.16.1
nvm use 18.16.1
npm config set registry https://registry.npmmirror.com
npm install -g yarn
- 安装
Java
环境
yum install java-11-openjdk-devel
- 安装
lrzsz
yum install lrzsz
- 安装
clojure
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
chmod +x linux-install.sh
./linux-install.sh
clojure -v
- 下载
metabase
代码,进行编译
git clone https://github.com/metabase/metabase.git
cd metabase
git checkout v0.47.2
mv metabase metabase_v0.47.2
cd metabase_v0.47.2/
# 按照本文档最上面的修改2000行限制即可
yarn cache clean
yarn config set registry https://registry.npm.taobao.org/
yarn add cypress --registry=https://registry.npm.taobao.org
cd bin/
sh build.sh
# 编译的过程十分的久,可能两个小时,途中会有超时什么的,会询问你是否跳过,还是重试,直接选择跳过即可。
# 最后编译成功之后,会打印出生成metabase.jar的路径,可以使用sz metabase.jar 导出到windows上面