CentOS7.2安装Airflow
1 安装pip
yum -y install epel-release
yum install python-pip
2 更新pip
pip install --upgrade pip
pip install --upgrade setuptools
3 安装各种开发库
1 2 3 | yum install python-devel yum install libevent-devel yum install mysql-devel |
4 安装Airflow
在此之前需要设定临时环境变量
export SLUGIFY_USES_TEXT_UNIDECODE=yes
pip install apache-airflow
遇到第一个问题
1 | ERROR: Cannot uninstall 'enum34' . It is a distutils installed project and <br>thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. |
解决
1 | pip install --ignore-installed enum34 |
然后再重新执行命令
遇到第二个问题
ERROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决
1 | pip install --ignore-installed apache-airflow |
5 初始化数据库 并 启动
1 2 | airflow initdb airflow webserver -p 8080 |
8 防止密码明文存储
1 | pip install cryptography |
9 替换数据库为mysql
1 | pip install apache-airflow[mysql] |
10 创建mysql用户
1 2 3 4 | create database airflow; create user 'testairflow' @ '%' identified by '123123' ; GRANT all privileges on airflow.* TO 'testairflow' @ '%' IDENTIFIED BY '123123' ; FLUSH PRIVILEGES; |
11 修改Airflow配置文件,指向mysql用户
1 | ~/airflow/airflow.cfg 文件修改:sql_alchemy_conn = mysql: //ct:152108@localhost/airflow |
12 mysql配置更新
1 2 3 4 | vim /etc/my.cnf explicit_defaults_for_timestamp=1 // 添加此行 systemctl restart mysqld airflow initdb |
13 重启Airflow
1 | airflow webserver -p 8080 |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· Blazor Hybrid适配到HarmonyOS系统
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 解决跨域问题的这6种方案,真香!
· 分享4款.NET开源、免费、实用的商城系统
· 一套基于 Material Design 规范实现的 Blazor 和 Razor 通用组件库