1. 程式人生 > 其它 >DataHub開源元資料管理工具搭建及使用

DataHub開源元資料管理工具搭建及使用

一、DataHub安裝

  1、安裝docker和docker-compose

    yum -y install docker

    curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

    chmod +x /usr/local/bin/docker-compose

    檢視是否安裝成功:

    docker --version

    docker-compose --version

  2、安裝jq

    yum install epel-release

    yum -y install jq

  3、安裝python3

    yum -y groupinstall "Development tools"

    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel

    wgethttps://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz

    tar -zxvf Python-3.7.3.tgz

    mkdir /usr/local/python3

    cd Python-3.7.3

    ./configure --prefix=/usr/local/python3

    make && make install

    修改系統python環境:

    rm -rf /usr/bin/python

    ln -s /usr/local/python3/bin/python3 /usr/bin/python

    修改pip環境:

    rm -rf /usr/bin/pip

    ln -s /usr/local/python3/bin/pip3 /usr/bin/pip

    將python環境改為python3後需要改下yum的檔案,預設使用的python2:

    vi /usr/bin/yum => 把 #! /usr/bin/python 修改為 #! /usr/bin/python2
    vi /usr/libexec/urlgrabber-ext-down => 把 #! /usr/bin/python 修改為 #! /usr/bin/python2

二、實踐