安装步骤
sudo apt update
sudo apt install python3-pip
pip3 install --upgrade pip
配置文件安装路径及环境变量
export AIRFLOW_HOME=~/airflow
pip3 install apache-airflow
export AIRFLOW_HOME=/home/work/airflow
echo 'export PATH=/usr/local/bin:$PATH' >>~/.bashrc
source ~/.bashrc
初始化 airflow
airflow db init
配置 webserver
vim /home/work/airflow/airflow.cfg
[webserver]
security = Flask AppBuilder
secure_mode = True
rbac=True
重置 airflow
airflow db reset
创建账号密码
airflow users create --lastname user --firstname admin --username name --email xxx@xxx.com --role Admin --password password
启动服务
airflow webserver --port 8080 --hostname 0.0.0.0 # 注意:ubuntu如果有开启防火墙,则需要允许端口8080通过
web 访问
http://xxx.xxx.xxx.xxx:8080/home
账号:xxxx
密码:xxxx
网友评论