一、配置python虛擬環境,請參考
superset依賴python3.6環境
https://www.cnblogs.com/xibuhaohao/p/9994854.html
二、安裝配置superset
參考superset官網
1.安裝依賴包
For Fedora and RHEL-derivatives, the following command will ensure that the required dependencies are installed:
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.升級pip,用來符合python的版本
Put all the chances on your side by getting the very latest pip
and setuptools
libraries.:
pip install --upgrade setuptools pip
3.安裝與配置superset
Follow these few simple steps to install Superset.:
# Install superset
pip install superset
# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
fabmanager create-admin --app superset
# Initialize the database
superset db upgrade
# Load some data to play with
superset load_examples
# Create default roles and permissions
superset init
# To start a development web server on port 8088, use -p to bind to another port
superset runserver -d
三、登錄superset連接數據庫
1.配置MySQL連接
一開始配置的時候報出錯誤,沒有MySQL數據庫連接驅動,到python虛擬環境安裝,一直報錯
按照觀方
2.解決報錯
通過搜索,找到一片文章,需要安裝mysqlclient的依賴包 https://blog.csdn.net/xc_zhou/article/details/80871374
yum install mysql-devel
再次安裝mysqlclinet則ok
3.配置superset連接數據庫
mysql://dbadmin:dbadmin@127.0.0.1:3306/dbadmin