superset安装步骤
程序员文章站
2024-03-12 12:05:02
...
Superset目前使用Python 2.7和Python 3.4+进行测试。 推荐Python 3,不支持Python 2.6。
第一步:下载依赖包
yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel sqlite-devel -y
第二步:安装python
[root@hadoop6 software]# python -V
Python 2.6.6
- 安装sqlite3
[root@hadoop5 software]# wget http://www.sqlite.org/sqlite-amalgamation-3.6.20.tar.gz
[root@hadoop5 software]# tar zxvf sqlite-amalgamation-3.6.20.tar.gz
[root@hadoop5 software]# cd sqlite-3.6.20
./configure --prefix=/usr/local/lib/sqlite3 && make && make install
[root@hadoop5 sqlite-3.6.20]# ./configure --prefix=/usr/local/lib/sqlite3 && make && make install
- 安装python2.7
root@hadoop6 software]# xz -d Python-2.7.14.tar.xz
[root@hadoop6 software]# tar -vx -f Python-2.7.14.tar
在setup.py中添加一行:
[root@hadoop6 Python-2.7.14]# ./configure --prefix=/usr/local/python27 && make && make install
- 创建软连接
[root@hadoop5 ~]# mv /usr/bin/python /usr/bin/python.bak
[root@hadoop6 Python-2.7.14]# ls -s /usr/local/python27/bin/python /usr/bin/python
[root@hadoop6 Python-2.7.14]# python -V
Python 2.7.14
- 安装setuptools
[root@hadoop6 software]# unzip setuptools-33.1.1.zip
[root@hadoop6 software]# cd setuptools-33.1.1
[root@hadoop6 setuptools-33.1.1]# python setup.py install
- 安装pip
[root@hadoop6 software]# tar -zvx -f pip-9.0.1.tar.gz
[root@hadoop6 software]# cd pip-9.0.1
[root@hadoop6 pip-9.0.1]# python setup.py install
- 安装pysqlite2
[root@hadoop6 software]# yum install sqlite-devel -y
[root@hadoop6 software]# wget peak.telecommunity.com/dist/ez_setup.py
[root@hadoop6 software]# python2.6 ez_setup.py
[root@hadoop6 software]# easy_install pysqlite
- 安装mysql客户端
[root@hadoop5 pysqlite2-master]# yum install mysql-devel.x86_64 (centos6)
[root@gateway ~]# yum install -y mysql++-devel.x86_64 (centos7)
[root@hadoop5 pysqlite2-master]# pip install mysqlclient
- 安装impala
[root@hadoop5 superset]# pip install git+https://github.com/cloudera/impyla.git
[root@hadoop5 superset]# pip install impyla
第三步:安装superset
- 安装Superset
[root@hadoop5 pysqlite2-master]# pip install superset
- 配置默认数据库为mysql
[root@hadoop5 pysqlite2-master]# cd ./venv/lib/python2.7/site-packages/superset
[root@hadoop5 superset]# vim config.py
- 创建管理员用户名和密码
[root@hadoop5 pip-9.0.1]# fabmanager create-admin --app superset
- 初始化Superset
[root@hadoop5 Python-2.7.14]# superset db upgrade
- 装载初始化样例数据
[root@hadoop5 Python-2.7.14]# superset load_examples
- 创建默认角色和权限
[root@hadoop5 Python-2.7.14]# superset init
- 启动Superset
[root@hadoop5 Python-2.7.14]# nohup /usr/lib/python2.7/site-packages/superset/bin/superset runserver -d -p 8088 >> /opt/software/superset/log/default.log &
- 配置缓存
/usr/lib64/python2.7/site-packages/flask_cache
### 参考地址
http://blog.csdn.net/qq_33440665/article/details/65628551
- 汉化
### 参考地址:
http://www.cnn6.net/html/bigdata/2017618/202084.html
下一篇: Kubernetes 二进制包部署