Open source visualization tool Caravel installation under Linux (including the lack of js solution)

1. Introduction to Caravel

  Caravel is an open source data exploration and visualization platform (formerly known as Panoramix) of Airbnb (a well-known online short-term rental company). Most importantly BS based

  For usage, please refer to: http://lxw1234.com/archives/2016/06/691.htm

  The running effect after installation is as follows:

 

2. Installation steps

  The installation steps are divided into the following parts:

  1. Install python

  Since the python that comes with centos is version 2.6.6, but caravel only supports version 2.7, you need to install version 2.7 of python.

  Installation steps can refer to: http://www.cnblogs.com/dudu/p/4294238.html

  The basic steps are the following commands:

yum groupinstall "Development tools"

yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel
yum install sqlite-devel

cd / opt
wget --no-check-certificate 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

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

ln -s /usr/local/bin/python2.7 /usr/local/bin/python

python -V

 

2. Install pip

  Before installing pip, you need to install easyinstall, which can be downloaded from the official website (https://pypi.python.org/pypi/setuptools)

  In fact, it is to download a file called ez_setup.py, use the command to download and install:

wget https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py

 Then the Scripts directory will be generated in the python installation directory, which contains easy_install, use this command to install pip

easy_install pip

 

3. Install Caravel

  Official installation instructions: http://airbnb.io/caravel/installation.html

  Download Caravel, download address: https://github.com/airbnb/caravel

wget https://github.com/airbnb/caravel/archive/master.zip

 Unzip and enter its root directory, use the pip command to install (considering that the overseas server is too slow, the source of Tsinghua University is used here):

pip install . -i https://pypi.tuna.tsinghua.edu.cn/simple/

 

4. Initialize operation

 

## create admin user

fabmanager create-admin --app caravel

 

## Initialize Caravel metadata

caravel db upgrade

 

## Initialize Caravel's default user roles and permissions

caravel init

 

## Load sample data (optional)

 

caravel load_examples

 

Start the server:

caravel runserver -p 8088

 

Third, the solution to the lack of JS error reporting

  After the installation is complete, visit the page and enter the dashboard to find the page css error, and the lack of js and css is prompted. The main reason is that the relevant CSS has not been downloaded. This problem is not mentioned in the official document. In fact, you only need to run /opt/caravel-master js_build.sh under /caravel/assets is fine

  js_build.sh uses the npm command to download many nodejs libraries, so you also need to install nodejs and npm. For details, please refer to my article: http://www.cnblogs.com/kevin19900306/p/5701281.html

  After the installation is complete run:

sh js_build.sh

 

  PS: The npm command is used in this sh file, which is downloaded from a foreign source. It is extremely slow. It is recommended to change it to cnpm (Taobao mirror command, you need to refer to my blog post to install the cnpm command). The modified sh file is as follows:

#!/bin/bash
set -e
cd "$(dirname "$0")"
npm --version
cnpm install
npm run lint
npm run test
npm run prod

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326562276&siteId=291194637