zoukankan      html  css  js  c++  java
  • 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容器
    
    
  • 相关阅读:
    记录一次Jmeter性能测试
    【转】解疑性能测试之集合点
    WebService的发布及客户端的调用
    Jmeter性能测试之如何写Java请求测试用例类
    Vue nextTick用法
    Geolocation 地理定位
    Vue 生命周期及运用场景
    CSS3 动画基本使用
    Electron菜单
    Electron + vue 项目安装vue-devtools调试工具
  • 原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/13700299.html
Copyright © 2011-2022 走看看