airflow 安裝步驟

由於python2.7各類版本的問題,因此最終使用 python3.6html

一、下載anaconda3
二、經過conda 建立虛擬環境
三、根據airflow 的官方文檔 Quick Start, 部署demo
     文檔 URL: http://airflow.apache.org/start.htmlpython

-- 將數據存儲從sqlite變成mysql
四、安裝mysql
     文檔 URL: https://dinfratechsource.com/2018/11/10/how-to-install-latest-mysql-5-7-21-on-rhel-centos-7/mysql

五、設置mysql sql

a.在my.cnf中的[mysqld]下,加入 explicit_defaults_for_timestamp=1
b.在mysql 中建立一個airflow的庫
apache

六、修改airflow 的airflow.cfg文件 參考官方文檔的 Initializing a Database Backend
      文檔 URL: http://airflow.apache.org/howto/initialize-database.htmlcentos

主要涉及2點:
a.修改 airflow.cfg 文件中的 executor, 將其值修改成 LocalExecutor
b.修改 airflow.cfg 文件中的 sql_alchemy_conn,
   將其值修改成 mysql+pymysql://username:password@ip:port/airflowpython2.7

七、啓動airflowui

相關文章
相關標籤/搜索