Install and configure caravel in centos 7

Source: Internet
Author: User

Install and configure caravel in centos 7

Install Basic Package: yum groupinstall "Development tools"

1. pip installation 1. Install python

Python of version 2.7 is required. If centOS comes with version 2.7, it does not need to be installed (centOS7 comes with version 2.7.5)
① Download 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
④ Test
# Python-V

② Decompress

③ Compile and install

#./Configure -- prefix =/usr/local

2. Install pip

First
# Yum install epel-release
Then
# Yum install python-pip

3. Install caravel

① Obtain the caravel source code
# Wget https://github.com/airbnb/caravel/archive/master.zip
② Decompress
# Unzip caravel-master.zip
③ Installation
Go to the root directory and run the pip command to install it. (The Source of Tsinghua University is used here, considering that overseas servers are too slow)
# Pip install.-I https://pypi.tuna.tsinghua.edu.cn/simple/

4. Error (if there is an error, execute the following)

① 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

Ii. nmp installation 1. Install nodejsto download node-v4.5.0.tar.gz (official website)
Extract

#./Configure -- prefix =/usr/local
# Make
# Make install
# Ln-s/usr/local/bin/node/usr/bin/node

2. Install npm

Download install. sh (https://npmjs.org/install.sh) from URL)
# Sh install. sh

3. Install express

# Npm install express-g

4. Install caravel (source code installation)

# 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

3. Create an admin user during initialization
# Fabmanager create-admin -- app caravel
Initialize caravel metadata
# Caravel db upgrade
Initialize caravel's default user roles and permissions
# Caravel init
Load sample data
# Caravel load_examples
Define the running Port
# Caravel runserver-p 8088
Access through http: // localhost: 8088

4. Connect to the data source 1. postgresql
Yum install build-dep python-psycopg2
Pip install psycopg2
2. mysql
Yum install MySQL-pythonDatabasePypi packageSQLAlchemy URI prefixMySQL pipinstallmysqlclient mysql://Postgres pipinstallpsycopg2 postgresql+psycopg2://Presto pipinstallpyhive presto://Oracle pipinstallcx_Oracle oracle://Sqlite sqlite://Redshift pipinstallsqlalchemy-redshift redshift+psycopg2://MSSQL pipinstallpymssql mssql://Impala pipinstallimpyla impala://SparkSQL pipinstallpyhive jdbc+hive://Note: if an error occurs when you connect to the data source, for example, importError no moduel MySQLdb, the solution is as follows:

Install MySQL-python in linux

The first method is simple: yum installMySQL-python

The second type is complex: You need to compile your own source code, and there are many dependent packages.

A. gcc

B. setuptools

C. python-dev

The detailed steps in Chapter 2 are as follows:

A. Download: wgethttp: // sourceforge.net/projects/mysql-python/files/latest/download

B.

$ Tar xfz MySQL-python-1.2.3.tar.gz
$ MySQL-python-1.2.3 cd

$ Whereismysql_config

Mysql_config:/usr/bin/mysql_config
$ Vim site. cfg
Modify mysql_config to the mysql configuration file path/usr/bin/mysql_config

Also modify

Threadsafe = False
$ Python setup. py build
$ Sudo python setup. py install in the python environment >>> import MySQLdb
/Usr/local/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/_ mysql. py: 3: UserWarning: Module _ mysql was already imported from/usr/local/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/_ mysql. pyc, but/app/MySQL-python-1.2.5 is being added to sys. if the path is successfully installed, warn is reported during the installation process. error: command 'gcc 'failed with exit status 1. Use yum install gcc to check whether the latest version is installed and the mysql-devel package is not installed. solution: yum install mysql-devel reference: http://blog.csdn.net/wklken/article/details/7271019http://blog.csdn.net/agoago_2009/article/details/9492765

Reference File

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.