安裝基礎包:yum groupinstall "Development tools"
需要2.7版本的Python,如果centOS自帶的是2.7的則不需安裝(centOS7自帶了2.7.5)
① 下載 python
https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
# tar xf Python-2.7.9.tar.xz
# cd Python-2.7.9
# make && make altinstall
# ln -s /usr/local/bin/python2.7 /usr/local/bin/python
④ 測試
# python -V
② 解壓
③ 編譯安裝
# ./configure --prefix=/usr/local
首先
# yum install epel-release
然後
# yum install python-pip
① 獲得caravel源碼
# wget https://github.com/airbnb/caravel/archive/master.zip
② 解壓
# unzip caravel-master.zip
③ 安裝
進入根目錄,使用pip命令安裝(考慮到境外服務器太慢,這裡使用清華大學的源)
# pip install . -i https://pypi.tuna.tsinghua.edu.cn/simple/
① cffi
yum install libffi-devel
② sasl
yum install libgsasl-devel
yum install libmemcached-devel
③ python
yum install python-devel
④ openssl
yum install openssl-devel
⑤ pytz
pip install --upgrade pytz
⑥ npy_math.py
yum install numpy
yum install openssl
# ./configure --prefix=/usr/local
# make
# make install
# ln -s /usr/local/bin/node /usr/bin/node
根據網址下載 install.sh (https://npmjs.org/install.sh)
# sh install.sh
# npm install express -g
## assuming $CARAVEL_HOME as the root of the repo
# cd $CARAVEL_HOME/caravel/assets
# npm install
# npm run prod
# cd $CARAVEL_HOME
# python setup.py install
pipinstallmysqlclient
mysql://
Postgrespipinstallpsycopg2
postgresql+psycopg2://
Prestopipinstallpyhive
presto://
Oraclepipinstallcx_Oracle
oracle://
sqlitesqlite://
Redshiftpipinstallsqlalchemy-redshift
redshift+psycopg2://
MSSQLpipinstallpymssql
mssql://
Impalapipinstallimpyla
impala://
SparkSQLpipinstallpyhive
jdbc+hive://
注意如果連接數據源報錯如連接mysql數據源報錯 importError no moduel MySQLdb解決辦法如下:第一種 簡單:yum installMySQL-python
第二種:復雜:需要自己源碼編譯,依賴包比較多
a. gcc
b.setuptools
c.python-dev
第二章詳細步驟如下:A.下載:wgethttp://sourceforge.net/projects/mysql-python/files/latest/downloadB.$ tar xfz MySQL-python-1.2.3.tar.gz參考文件
http://www.aboutyun.com/thread-19402-1-1.html
http://blog.csdn.net/csulfy/article/details/51833407
http://lxw1234.com/archives/2016/06/681.htm
http://km-moon11.iteye.com/blog/2213527
http://airbnb.io/caravel/installation.html
http://xxxxxx/Linuxjc/1184797.html TechArticle