superset安装部署

superset安装部署

安装Python3环境准备的包

[root@JD /]# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

[root@JD src]# pwd
/usr/local/src
[root@JD src]# ll
total 22396
-rw-r--r-- 1 root root 22930752 Dec 29 14:52 Python-3.6.6.tgz

安装Python3环境

#解压缩
[root@JD src]# tar  -xf Python-3.6.6.tgz
#配置
[root@JD Python-3.6.6]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.6... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/Python-3.6.6':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

安装gcc 解决报错
yum -y install gcc

重新执行配置
[root@JD Python-3.6.6]# ./configure

#安装
[root@JD Python-3.6.6]# make && make install

安装EPEL源并安装superset必备的包

#安装epel源
[root@JD Python-3.6.6]# yum -y install epel-release

#安装MySQL开发包,属于pymysqlclient依赖
[root@JD Python-3.6.6]# yum -y install mysql-devel

#安装依赖包
[root@JD Python-3.6.6]# yum -y install gcc gcc-c++ libffi-devel python-devel python-wheel openssl-devel libsasl2-devel openldap-devel

安装python3的virtualenv并建⽴superset的env

#安装virtualenv
[root@JD Python-3.6.6]# pip3 install virtualenv -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

#建立superset的venv
[root@JD Python-3.6.6]# cd ../
[root@JD src]# pwd
/usr/local/src
[root@JD src]# python3 -m venv superset-py3


#激活superset的venv
[root@JD src]# source superset-py3/bin/activate
(superset-py3) [root@JD src]# 

在env中安装superset

#升级pip
(superset-py3) [root@JD src]# pip3 install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

#升级setuptools
(superset-py3) [root@JD src]# pip3 install --upgrade setuptools -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

#安装superset
(superset-py3) [root@JD src]# pip3 install superset -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

安装superset数据库包

#安装mysql连接包
(superset-py3) [root@JD src]# pip3 install mysqlclient -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

#安装mssql连接包
(superset-py3) [root@JD src]# pip3 install "pymssql<3.0" -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

配置superset

(superset-py3) [root@JD src]# vi superset-py3/lib/python3.6/site-packages/superset/config.py

修改superset配置⽂件,将默认的sqlite3数据库改为MySQL找到:
SQLALCHEMY_DATABASE_URI = 'mysql://root:mysqladmin@JD/superset?charset=utf8'

mysql创建superset数据库

create database `superset`;

初始化

#建立管理员账号 jepson,密码123456
(superset-py3) [root@JD src]# fabmanager create-admin --app superset
fabmanager is going to be deprecated in 2.2.X, you can use the same commands on the improved 'flask fab <command>'
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: 790461730@qq.com
Password: 
Repeat for confirmation: 
2019-12-30 01:53:38,115:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Recognized Database Authentications.
Admin User admin created.

(superset-py3) [root@JD src]# superset db upgrade

#初始化superset数据库
(superset-py3) [root@JD src]# superset init

mysql执行
alter table superset.table_columns modify type varchar(255);

后台启动

nohup superset run -h JD -p 8889 &

Web

http://JD:8889
admin/admin
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值