superset是一个python 开发的可视化工具,可以与kylin连接进行数据分析,在官网的讲解中,采用了在线安装方式,生产环境中有yum源,但是没有网,不得不采用离线安装方式。(我们先在有网的环境下,下载所有的包)
------------------------------- 第一步:下载依赖包----------------
前提:为了不搞乱生产环境,我们单独装一个python3.6用于superset环境安装:提前准备好python安装包用于python环境安装:
1.python包
2.pip最新的包
3.setuptools最新的包
https://www.cnblogs.com/students/p/9535442.html
在有网络的环境下,保证pip和setuptools都已经升级到了最新的状态,我们通过刚刚安装的python里的最新的pip来下载 kylinpy和superset
mkdir kylinpy
cd kylinpy
#下面这个pip需要刚刚安装的
pip download kylinpy
[root@localhost kylinpy]# ls
click-6.7-py2.py3-none-any.whl kylinpy-2.0.2.tar.gz
mkdir superset
cd superset
pip download superset #superset的包好多啊
[root@localhost superset]# ll
alembic-1.0.3.tar.gz
Flask-Babel-0.12.2.tar.gz
jsonschema-2.6.0-py2.py3-none-any.whl
rfc3986-1.1.0-py2.py3-none-any.whl
amqp-2.3.2-py2.py3-none-any.whl
Flask_Caching-1.4.0-py2.py3-none-any.whl kombu-4.2.1-py2.py3-none-any.whl
s3transfer-0.1.13-py2.py3-none-any.whl
asn1crypto-0.24.0-py2.py3-none-any.whl
Flask-Compress-1.4.0.tar.gz
linear-tsv-1.1.0.tar.gz sasl-0.2.1.tar.gz
Babel-2.6.0-py2.py3-none-any.whl
Flask-Login-0.4.1.tar.gz Mako-1.0.7.tar.gz
simplejson-3.16.0.tar.gz
billiard-3.5.0.4.tar.gz Flask_Migrate-2.3.0-py2.py3-none-any.whl Markdown-3.0.1-py2.py3-none-any.whl
six-1.11.0-py2.py3-none-any.whl
bleach-3.0.2-py2.py3-none-any.whl
Flask-OpenID-1.2.5.tar.gz
MarkupSafe-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
SQLAlchemy-1.2.14.tar.gz
boto3-1.4.7-py2.py3-none-any.whl
Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl
numpy-1.15.4-cp36-cp36m-manylinux1_x86_64.whl
SQLAlchemy-Utils-0.33.8.tar.gz
botocore-1.7.48-py2.py3-none-any.whl
Flask_WTF-0.14.2-py2.py3-none-any.whl
openpyxl-2.4.11.tar.gz sqlparse-0.2.4-py2.py3-none-any.whl
cchardet-2.1.4-cp36-cp36m-manylinux1_x86_64.whl
flower-0.9.2.tar.gz
pandas-0.23.4-cp36-cp36m-manylinux1_x86_64.whl
superset-0.28.1.tar.gz
celery-4.2.1-py2.py3-none-any.whl
future-0.16.0.tar.gz
parsedatetime-2.4.tar.gz
tableschema-1.2.5-py2.py3-none-any.whl
certifi-2018.10.15-py2.py3-none-any.whl
geographiclib-1.49.tar.gz pathlib2-2.3.2-py2.py3-none-any.whl tabulator-1.19.0-py2.py3-none-any.whl
cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
geopy-1.17.0-py2.py3-none-any.whl
polyline-1.3.2-py2.py3-none-any.whl
thrift-0.11.0.tar.gz
chardet-3.0.4-py2.py3-none-any.whl
gunicorn-19.9.0-py2.py3-none-any.whl
pycparser-2.19.tar.gz thrift_sasl-0.3.0.tar.gz
click-6.7-py2.py3-none-any.whl
humanize-0.5.1.tar.gz pydruid-0.4.5.tar.gz
tornado-5.1.1.tar.gz
colorama-0.3.9-py2.py3-none-any.whl
idna-2.7-py2.py3-none-any.whl
PyHive-0.6.1.tar.gz unicodecsv-0.14.1.tar.gz
contextlib2-0.5.5-py2.py3-none-any.whl
ijson-2.3-py2.py3-none-any.whl
python3_openid-3.1.0-py3-none-any.whl
Unidecode-1.0.23-py2.py3-none-any.whl
cryptography-2.4.2-cp34-abi3-manylinux1_x86_64.whl
isodate-0.6.0-py2.py3-none-any.whl
python_dateutil-2.7.5-py2.py3-none-any.whl
urllib3-1.24.1-py2.py3-none-any.whl
defusedxml-0.5.0-py2.py3-none-any.whl
itsdangerous-1.1.0-py2.py3-none-any.whl
python-editor-1.0.3.tar.gz
vine-1.1.4-py2.py3-none-any.whl
docutils-0.14-py3-none-any.whl
jdcal-1.4-py2.py3-none-any.whl
python-geohash-0.8.5.tar.gz
webencodings-0.5.1-py2.py3-none-any.whl
et_xmlfile-1.0.1.tar.gz
Jinja2-2.10-py2.py3-none-any.whl
pytz-2018.7-py2.py3-none-any.whl
Werkzeug-0.14.1-py2.py3-none-any.whl
Flask-0.12.4-py2.py3-none-any.whl
jmespath-0.9.3-py2.py3-none-any.whl
PyYAML-3.13.tar.gz
WTForms-2.2.1-py2.py3-none-any.whl
Flask-AppBuilder-1.12.2.tar.gz
jsonlines-1.2.0-py2.py3-none-any.whl
requests-2.20.1-py2.py3-none-any.whl
xlrd-1.1.0-py2.py3-none-any.whl
----------------------------------------------这样,kylin包和superset包 都下载完成了,我们也拥有了python包、最新的setuptools、pip包,此时,我们还需要一个文件require.txt,这个文件如何获取呢?
先查看已有的安装包
pip freeze
在线安装superset
pip install superset
再次查看
pip freeze > require.txt
把之前安装的内容剔除掉就是superset的依赖包安装顺序
第二步:离线安装阶段 -----------------------------------------
1.python安装:
https://www.cnblogs.com/students/p/9535442.html
2.安装superset需要的环境
yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
3.安装kylinpy和superset
../python/bin/pip install click-6.7-py2.py3-none-any.whl
../python/bin/pip install kylinpy-2.0.2.tar.gz ../python_superset/bin/pip install --no-index --find-links="../package_superset" -r requirements.txt
4.初始化安装配置(我们单独安装的python环境,没有启动python的虚拟环境)
# 创建admin管理员账户
fabmanager create-admin --app superset
# 初始化数据库
superset db upgrade
# 初始化角色和权限
superset init
# 启动Superset服务
gunicorn -w 2 --timeout 60 -b 0.0.0.0:8088 --limit-request-line 0 --limit-request-field_size 0 superset:app
关闭防火墙可以通过浏览器进行访问