Ubuntu20.04和Docker环境下安装Redash中文版
创建Ubunt20.04虚拟机,请参考:https://www.linuxidc.com/Linux/2020-03/162547.htm
一、安装基础环境:
# 1.更换APT国内源
sudo sed -i s@/cn.archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
# 2.更新源
sudo apt update && sudo apt upgrade -y
# 3.安装Docker和Docker-Compose
sudo apt install docker docker-compose -y
# 4.更换Docker国内源
sudo tee /etc/docker/daemon.json <<'EOF'
{
"registry-mirrors": ["http://registry.docker-cn.com"]
}
EOF
# 5.重启Docker服务
sudo systemctl restart docker
# 6.安装Nodejs和npm
sudo apt install nodejs npm -y
# 7.更换npm国内源
sudo npm config set registry https://registry.npm.taobao.org
# 8.升级最新Nodejs版本
sudo npm install n -g && sudo n stable
二、启动Docker自动安装执行
# 1.下载源码
# https://github.com/dazdata/redash.git # 这个是国内的那个地址,屏蔽了好多数据源
# https://github.com/getredash/redash.git # 这是官方的,建议采用这个
git clone https://github.com/getredash/redash.git && cd redash
# 2.Docker安装(若不成功需要重来多试几次)
sudo docker-compose up
# sudo docker-compose up -d # 后台运行
三、自动安装后处理
#1.前端npm依赖包安装(警告可以忽略,若报错需要重来多试几次)
sudo npm install
# 2.前端打包
sudo npm run build
# 若是使用sudo npm run build报错,则可以使用cnpm的方式,
# rm -rf node_modules package-lock.json
# npm cache clear --force
# sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
# sudo cnpm install
# sudo cnpm run build
# 3.初始化数据库表结构
sudo docker-compose run --rm server create_db
四、启动系统&初始设置
# 1.启动Docker容器
sudo docker-compose start
若要停止Docker容器
sudo docker-compose stop
# 2.进入浏览器
http://localhost:5000
# 3.后续使用
注意一定先执行cd redash后,再执行sudo docker-compose start以启动docker容器
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2019-09-20 mysql+canal+kafka+elasticsearch构建数据查询平台
2019-09-20 zookeeper集群搭建
2019-09-20 另类--kafka集群中jmx端口设置
2019-09-20 kafka集群中jmx端口设置
2019-09-20 使用zookeeper报错 stat is not executed because it is not in the whitelist. envi is not executed because it is not in the whitelist.