前提

系统:CentOS 7.3.1611

软件环境:python3

安装

通常在安装airflow时,需要设置AIRFLOW_HOME 环境变量,作为airflow的主目录;如果未设置,则默认是~/airflow

export AIRFLOW_HOME=~/airflow

在airflow 1.8.0之前,pip安装命令是下面的方式

pip install airflow==1.8.0

在airflow 1.8.0之后,pip安装命令是下面的方式

pip install apache-airflow==1.8.1

如果需要将airflow更新到最新的版本

pip install apache-airflow -U

在安装Airflow时,可以支持额外的特性,比如S3或postgres

pip install "apache-airflow[s3,postgres]"

卸载

如果卸载airflow

pip uninstall apache-airflow==1.8.2

这种方式的卸载并不能删除安装时的相关依赖。

扩展包

apache-airflow 的PyPI包仅安装需要安装的组件,但Airflow可以条件性的导入operator,并安装相应的依赖。

子包 命令 说明
all pip install apache-airflow[all] 所有Airflow特性
all_dbs pip install apache-airflow[all_dbs] 所有数据库集成
async pip install apache-airflow[async] gunicorn的异步worker类
devel pip install apache-airflow[devel] 最小化dev工具
devel_hadoop pip install apache-airflow[devel_hadoop] airflow对Hadoop栈的依赖
celery pip install apache-airflow[celery] CeleryExecutor
crypto pip install apache-airflow[crypto] 加密metadata db的连接密码
druid pip install apache-airflow[druid] Druid.io相关的operators和hooks
gcp_api pip install apache-airflow[gcp_api] Google Cloud Platform的hooks及operators
jdbc pip install apache-airflow[jdbc] JDBC hooks及operators
hdfs pip install apache-airflow[hive] Hive相关operators
kerberos pip install apache-airflow[kerberos] kerberized hadoop
ldap pip install apache-airflow[ldap] ldap认证
mssql pip install apache-airflow[mssql] Microsoft SQL的operators及hooks,可用作Airflow backend
mysql pip install apache-airflow[mysql] MySQL的operators及hooks,可用作Airflow backend
password pip install apache-airflow[password] 用户的密码认证
postgres pip install apache-airflow[postgres] Postgres operators及hooks,可用作airflow的backend
qds pip install apache-airflow[qds] 支持QDS(qubole data services)
rabbitmq pip install apache-airflow[rabbitmq] 支持Rabbitmq,作为Celery backend
s3 pip install apache-airflow[s3] S3KeySensor,S3PrefixSensor
samba pip install apache-airflow[samba] Hive2SambaOperator
slack pip install apache-airflow[slack] SlackAPIPostOperator
vertica pip install apache-airflow[vertica] 支持Vertica hook,可用作Airflow backend
cloudant pip install apache-airflow[cloudant] Cloudant hook
redis pip install apache-airflow[redis] Reids hooks及sensors

results matching ""

    No results matching ""