superset安装记录

由于不熟悉python,踩了不少坑,仅以此文记录

1. centos 5.8 32位,更新及安装基本的编译环境

sudo yum upgrade python-setuptools
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel

2. 安装Python 3.4.8,注意要使用altinstall,否则后面的安装过程会出现找不到python 2 module的错误

wget https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tgz
tar xvf Python-3.4.8.tgz
cd Python-3.4.8

/configure --prefix=/usr/local
make
make altinstall

创建python3和pip的链接

cd /usr/bin
ln -s /usr/local/python3/bin/python3.4 ./python3
ln -s /usr/local/python3/bin/pip3.4 ./pip

不建议将python3设置默认的python执行程序,否则执行后续的yum操作会报错,当然可以用下面的脚本执行yum,但毕竟麻烦。

cd /usr/bin
python2.6 yum list installed

3. 修改环境变量,
当前目录增加到PATH中,设置语言为UTF-8,否则执行fabmanager会报错

vi ~/.bash_profile
将最后几行修改为:

PATH=.:$PATH:$HOME/bin
export PATH
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8export LANG=en_US.utf-8

4. 安装superset

pip install --upgrade setuptools pip

pip install superset

cd /usr/local/python3.4 /bin
python3 fabmanager create-admin --app superset
python3 superset db upgrade
python3 superset load_examples
python3 superset init
python3 superset runserver

5. 访问superset

http://localhost:8088

用户名为admin,口令是fabmanger中设置的口令

参考资料;
官方安装文档

Comments are closed.