安装基础包: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
database | pypi package | SQLAlchemy URI prefix |
---|---|---|
MySQL | pip install mysqlclient |
mysql:// |
Postgres | pip install psycopg2 |
postgresql+psycopg2:// |
Presto | pip install pyhive |
presto:// |
Oracle | pip install cx_Oracle |
oracle:// |
sqlite | sqlite:// |
|
Redshift | pip install sqlalchemy-redshift |
redshift+psycopg2:// |
MSSQL | pip install pymssql |
mssql:// |
Impala | pip install impyla |
impala:// |
SparkSQL | pip install pyhive |
jdbc+hive:// |
第一种 简单:yum install MySQL-python
第二种:复杂:需要自己源码编译,依赖包比较多
a. gcc
b. setuptools
c. python-dev
参考文件
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