superset 报表

环境准备

  • 安装Python3

    cd /opt
    wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
    

file

  • 解压&编译&安装

    tar -zxvf Python-3.6.0.tgz
    cd Python-3.6.0
    ./configure --prefix=/usr/local/python
    make && make install
    
  • 配置环境变量

    export PYTHON_HOME=/usr/local/python
    export PATH=$PATH:$PYTHON_HOME/bin
    

    使能:source /etc/profile

file

  • 配置Python2与Python3共存

    mv /usr/bin/python /usr/bin/python2
    ln -s /usr/local/python/bin/python3.6 /usr/bin/python
    ln -s /usr/local/python/bin/pip3 /usr/bin/pip
    

file

# 因为yum要依赖Python2 所以我们需要将这两个文件的表头修改为#! /usr/bin/python2
vi /usr/bin/yum
vi /usr/libexec/urlgrabber-ext-down

验证Python3

python -V

file

  • 安装依赖包

    yum upgrade python-setuptools
    yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel
    pip install --upgrade pip
    pip install cryptography
    

miniconda安装

  • 下载安装

    cd /opt
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    sh Miniconda3-latest-Linux-x86_64.sh
    

file

file

  • 加载环境变量

    source ~/.bashrc
    

file

  • 取消base自动激活

    conda config --set auto_activate_base false
    
  • 配置国内镜像

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    conda config --set show_channel_urls yes
    
  • 创建Python3.6的superset环境

    conda create --name superset python=3.6
    

file

  • 激活superset环境

    # 激活指定环境
    conda activate superset
    # 取消激活命令如下
    conda deactivate
    

file

安装superset

  • 环境依赖

    yum install -y python-setuptools
    yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel
    pip install --upgrade setuptools pip -i https://pypi.douban.com/simple/
    pip install cryptography
    

file

  • 安装superset

    pip install superset
    

file

  • 更新pip

    pip install --upgrade pip
    
  • superset依赖包安装

    # 自己上传
    pip install -r superset_packages
    
  • 初始化superset元库

    superset db upgrade
    

file

  • 创建管理员用户

    export FLASK_APP=superset
    flask fab create-admin
    

file

  • superset 初始化

    superset init
    

file

  • 安装kylinpy

    pip install kylinpy
    

file

启动superset

  • 启动命令

    nohup superset run -p 7676 -h worker-2 --with-threads > /dev/null 2>&1 &
    
  • 页面访问

    http://worker-2:7676

file

配置kylin数据库

file

file

Database:kylin

SQLAlchemy URI:kylin://ADMIN:KYLIN@worker-3:7070/learn_kylin?version=v1

或者

SQLAlchemy URI:kylin://ADMIN:KYLIN@worker-3:7070/default?project=learn_kylin

下面的选项可以全部选择,schema选项为必选项

file
海汼部落原创文章,原文链接:http://www.hainiubl.com/topics/75724

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值