Apache Superset 是一个现代的数据探索和可视化平台。它功能强大且十分易用,可对接各种数据源,包括很多现代的大数据分析引擎,拥有丰富的图表展示形式,并且支持自定义仪表盘。
?anaconda 是一个集成环境,不仅有Python,还有python需要的各种类库。
bash Miniconda3-latest-Linux-x86_64.sh
因为需要阅读协议,所以比较长按q键退出阅读。 最后同意协议 yes,并指定安装位置/usr/local/miniconda3
export CONDA_HOME=/usr/local/miniconda3
export PATH=$PATH:$CONDA_HOME/bin刷新环境变量
source /etc/profile
conda config --set auto_activate_base false
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --set show_channel_urls yes创建superset的环境:
conda create -n superset python=3.6
遇到 y| n 选择 y
source activate
conda activate superset
yum install -y python-setuptools
yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel?
pip install --upgrade setuptools pip -i https://mirrors.aliyun.com/pypi/simple/
pip install apache-superset -i https://mirrors.aliyun.com/pypi/simple/
pip install dataclasses -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host
pip install gunicorn -i http://mirrors.aliyun.com/pypi/simple/ mirrors.aliyun.com
pip install tushare --upgrade -i https://mirrors.aliyun.com/pypi/simple/
pip --default-timeout=100 install -U tushare --upgrade?
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip install sqlalchemy==1.3.24
pip uninstall cryptography
pip install cryptography==37.0.4
superset db upgrade
设置用户名密码
export FLASK_APP=superset
flask fab create-admin
最后再初始化
superset init
gunicorn -w 1 -t 120 -b 主机名:8787 "superset.app:create_app()"
-w ?worker数量 ?线程数
-t ?timeout ? 超时时间
-b ? bind ? ? 绑定IP地址
访问地址为ip:8787
conda install mysqlclient
pip install mysql-connector-pythonpip install PyMySQL
?再次启动superset
ps -ef | awk '/gunicorn/ && !/awk/{print $2}' | xargs kill -9
gunicorn -w 1 -t 120 -b 主机名:8787 "superset.app:create_app()"
mysql://root:123456@主机名或者ip/nshop_bi?charset=utf8